代码
来源:互联网 发布:农村淘宝佣金在哪看 编辑:程序博客网 时间:2024/05/29 07:19
from django.db import models
class Order(models.Model):
odr_customer=models.CharField(max_length=100)
odr_date=models.DateTimeField()
odr_addr=models.CharField(max_length=200)
odr_status=models.IntegerField()
class Meta:
ordering=['odr_date','odr_customer']
class Prodcut(models.Model):
prod_name=models.CharField(max_length=200)
prod_type=models.CharField(max_length=100)
prod_batch=models.CharField(max_length=200)
prod_unit=models.CharField(max_length=20)
prod_price=models.FloatField()
prod_memo=models.CharField(max_length=100)
class Meta:
ordering=['prod_name']
class Order_Line(models.Model):
odd_order_id=models.ForeignKey(Order)
odd_prod_id=models.ForeignKey(Prodcut)
odd_count=models.IntegerField()
odd_unit=models.IntegerField()
odd_price=models.IntegerField()
class Meta:
ordering=['odd_count','odd_unit']
class Storage(models.Model):
stk_prod_id=models.ForeignKey(Prodcut)
stk_warehouse=models.CharField(max_length=50)
stk_ware=models.CharField(max_length=50)
stk_count=models.CharField()
stk_memo=models.TextField()
class Meta:
ordering=['stk_count']
class Bas_Dict():
dict_type=models.CharField(max_length=50)
dict_item=models.CharField(max_length=50)
dict_value=models.CharField(max_length=50)
dict_is_editable=models.IntegerField()
class Meta:
ordering=['dict_type','dict_item']
------------------------------------------------------------
# -*- coding:utf-8 -*-
from django.db import models
from crm_project.role.yhglmk import Sys_User
class Cst_Customer(models):
cust_name=models.CharField(max_length=100)
cust_region=models.CharField(max_length=100,null=True)
cust_manager_id=models.ForeignKey(Sys_User,null=True)
cust_manager_name=models.ForeignKey(Sys_User,null=True)
cust_level=models.ForeignKey(Sys_User,null=True)
cust_satisfy=models.IntegerField(null=True)
cust_credit=models.IntegerField(null=True)
cust_addr=models.CharField(max_length=255,null=True)
cust_zip=models.CharField(max_length=20,null=True)
cust_tel=models.CharField(max_length=50,null=True)
cust_fax=models.CharField(max_length=50,null=True)
cust_website=models.CharField(max_length=50,null=True)
cust_licence_no=models.CharField(max_length=50,null=True)
cust_chieftain=models.CharField(max_length=50,null=True)
cust_bankroll=models.IntegerField(null=True)
cust_turnover=models.IntegerField(null=True)
cust_bank=models.CharField(max_length=200,null=True)
cust_bank_account=models.CharField(max_length=50,null=True)
cust_local_tax_no=models.CharField(max_length=50,null=True)
cust_national_tax_no=models.CharField(max_length=50,null=True)
cust_status=models.IntegerField(null=True)
class Meta:
ordering=['cust_name']
class Cst_Linkman(models.Model):
lkm_cust_no=models.ForeignKey(Cst_Customer)
lkm_name=models.CharField(max_length=50)
lkm_sex=models.CharField(max_length=5,default='��',null=True)
lkm_postion=models.CharField(max_length=50)
lkm_tel=models.CharField(max_length=50)
lkm_mobile=models.CharField(max_length=50,null=True)
lkm_memo=models.CharField(max_length=300,null=True)
class Meta:
ordering=['lkm_name']
class Cst_Activity(models.Model):
atv_cust_no=models.ForeignKey(Cst_Customer,null=True)
atv_date=models.DateTimeField()
atv_place=models.CharField(max_length=255)
atv_title=models.TextField()
atv_remark=models.TextField(null=True)
atv_desc=models.TextField(null=True)
class Meta:
ordering=['atv_date']
class Cus_Lose(models.Model):
lst_cust_no=models.ForeignKey(Cst_Customer)
lst_cust_manager_id=models.ForeignKey(Sys_User)
lst_last_order_date=models.DateTimeField(null=True)
lst_lost_date=models.DateTimeField(null=True)
lst_delay=models.TextField(null=True)
lst_reason=models.TextField(null=True)
lst_status=models.IntegerField()
---------------------------------------------------------
# -*- coding:utf-8 -*-
from django.db import models
from crm_project.cust.khglmk import Cst_Customer
from crm_project.role.yhglmk import Sys_User
class ServeInfo(models.Model):
svr_type=models.CharField(max_length=20)
svr_title=models.TextField()
svr_cust_no=models.ForeignKey(Cst_Customer,null=True)
svr_status=models.CharField(max_length=20,default='')
svr_request=models.CharField(max_length=255)
svr_create_id=models.ForeignKey(Sys_User)
svr_create_date=models.DateTimeField()
svr_due_id=models.ForeignKey(Sys_User,null=True)
svr_due_date=models.DateTimeField(null=True)
svr_deal=models.TextField(null=True)
svr_deal_id=models.ForeignKey(Sys_User,null=True)
svr_deal_date=models.DateTimeField(null=True)
svr_result=models.CharField(max_length=100,null=True)
svr_satisfy=models.IntegerField(null=True)
class Meta:
ordering=['svr_title','svr_type']
---------------------------------------------------------------
# -*- coding:utf-8 -*-
from django.db import models
class Sys_Role(models.Model):
role_name=models.CharField(max_length=50)
role_desc=models.CharField(max_length=50)
role_flag=models.IntegerField()
class Meta:
ordering=['role_name']
class Sys_User(models.Model):
usr_name=models.CharField(max_length=50)
usr_password=models.CharField(max_length=50)
usr_role_id=models.ForeignKey(Sys_Role)
usr_flag=models.IntegerField()
class Meta:
ordering=['usr_name']
class Sys_Right(models.Model):
right_code=models.CharField(max_length=50)
right_parent_code=models.CharField(max_length=50,null=True)
right_type=models.CharField(max_length=50,null=True)
right_text=models.CharField(max_length=50,null=True)
right_url=models.CharField(max_length=100,null=True)
right_tip=models.CharField(max_length=100,null=True)
class Meta:
ordering=['right_type']
class Sys_Role_Right(models.Model):
rf_role_id=models.ForeignKey(Sys_Role)
rf_right_code=models.ForeignKey(Sys_Right)
---------------------------------------------------------------------
# -*- coding:utf-8 -*-
from django.db import models
from crm_project.role.yhglmk import Sys_Role
class Sal_chance(models.Model):
chc_source=models.CharField(max_length=50)
chc_cust_name=models.CharField(max_length=100)
chc_title=models.TextField()
chc_rate=models.IntegerField()
chc_linkman=models.CharField(max_length=50,null=True)
chc_tel=models.CharField(max_length=50,null=True)
chc_desc=models.TextField()
chc_create_id=models.ForeignKey(Sys_Role)
chc_create_date=models.DateTimeField()
chc_due_id=models.ForeignKey(Sys_Role,null=True)
chc_due_date=models.DateTimeField(null=True)
chc_status=models.IntegerField(default=0)
class Meta:
ordering=['chc_create_id','chc_title']
def __str__(self):
return self.chc_title
class Sal_plan(models.Model):
pla_chc_id=models.ForeignKey(Sal_chance)
pla_date=models.DateTimeField()
pla_todo=models.TextField()
pla_result=models.TextField(null=True)
class Meta:
ordering=['pla_date','pla_chc_id']
def __str__(self):
return self.pla_todo
----------------------------------------------------------------
- 代码
- 代码!
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- 代码
- AndroidManifest.xml中声明不同包中的Activity
- Windows Phone 中应用颜色设置改变主题的应用
- 做技术的目标
- AutoPostback in the Listbox
- Agile PLM Engineering Collaboration 2011-11-25
- 代码
- String类封装
- CakePHP: Containable行为
- 我心目中的数学家
- SolidWorks eDraring Control
- linux硬链接与软连接的区别
- 后缀运算器(已补全)
- MYSQL注入语句大全
- 插件开发,为某个视图贡献右键菜单