|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
|
|
|
class EcChannel(models.Model):
|
|
|
|
id = models.IntegerField(primary_key=True)
|
|
|
|
env = models.CharField(verbose_name='环境', max_length=10, null=False) # 电商平台 dspt 自营电商 zyds
|
|
|
|
name = models.CharField(verbose_name='渠道名称', max_length=20, null=False) # 电商平台 dspt 自营电商 zyds
|
|
|
|
pid = models.CharField(verbose_name='渠道id', max_length=10, null=False) # pid
|
|
|
|
channel_key = models.CharField(verbose_name='渠道key', max_length=20, null=False) # pid key
|
|
|
|
type = models.CharField(verbose_name='会员非会员', max_length=20, default='', null=False) # 会员 member 非会员 nonmember
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.name
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
verbose_name = '渠道'
|
|
|
|
verbose_name_plural = '渠道'
|
|
|
|
db_table = 'ec_channel'
|
|
|
|
|
|
|
|
|
|
|
|
class EcEnv(models.Model):
|
|
|
|
id = models.IntegerField(primary_key=True)
|
|
|
|
name = models.CharField(verbose_name='环境名称', max_length=20, null=False) # 电商平台 自营电商
|
|
|
|
code = models.CharField(verbose_name='环境编码', max_length=20, null=False) # 电商平台 dspt 自营电商 zyds
|
|
|
|
type = models.CharField(verbose_name='会员非会员', max_length=20, default='', null=False) # 会员 member 非会员 nonmember
|
|
|
|
host = models.CharField(verbose_name='环境地址', max_length=50, null=False) # 环境地址
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.name
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
verbose_name = '环境'
|
|
|
|
verbose_name_plural = '环境'
|
|
|
|
db_table = 'ec_env'
|
|
|
|
|
|
|
|
|
|
|
|
class EcApi(models.Model):
|
|
|
|
id = models.IntegerField(primary_key=True)
|
|
|
|
description = models.CharField(verbose_name='接口描述', max_length=20, null=False)
|
|
|
|
path = models.CharField(verbose_name='接口地址', max_length=50, null=False)
|
|
|
|
type = models.CharField(verbose_name='会员非会员', max_length=20, default='', null=False) # 会员 member 非会员 nonmember
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.description
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
verbose_name = '接口'
|
|
|
|
verbose_name_plural = '接口'
|
|
|
|
db_table = 'ec_api'
|
|
|
|
|
|
|
|
|
|
|
|
class EcApiParams(models.Model):
|
|
|
|
id = models.IntegerField(primary_key=True)
|
|
|
|
api_id = models.IntegerField(verbose_name='接口id', null=False)
|
|
|
|
param = models.CharField(verbose_name='参数', max_length=50, null=False)
|
|
|
|
description = models.CharField(verbose_name='参数描述', max_length=500, null=False)
|
|
|
|
value = models.CharField(verbose_name='参数值模版', max_length=500, null=True, blank=True)
|
|
|
|
is_checked = models.BooleanField(verbose_name='是否默认勾选', null=False, default=False)
|
|
|
|
is_request = models.BooleanField(verbose_name='是否是必选项', null=False, default=False)
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.param
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
verbose_name = '接口参数'
|
|
|
|
verbose_name_plural = '接口参数'
|
|
|
|
db_table = 'ec_api_params'
|
|
|
|
|
|
|
|
|
|
|
|
class EcCinemaIds(models.Model):
|
|
|
|
id = models.IntegerField(primary_key=True)
|
|
|
|
env = models.CharField(verbose_name='环境', max_length=10, null=False) # 电商平台 dspt 自营电商 zyds
|
|
|
|
cinema_id = models.IntegerField(verbose_name='影院id', null=False)
|
|
|
|
cinema_name = models.CharField(verbose_name='影院名称', max_length=30, null=False)
|
|
|
|
cid = models.CharField(verbose_name='影院cid', max_length=10, null=False)
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.cid
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
verbose_name = '影院cid'
|
|
|
|
verbose_name_plural = '影院cid'
|
|
|
|
db_table = 'ec_cinema_cid'
|
|
|
|
|
|
|
|
|
|
|
|
class EcRequestLog(models.Model):
|
|
|
|
id = models.IntegerField(primary_key=True)
|
|
|
|
ip = models.CharField(verbose_name='请求ip', max_length=20, null=False) # 接口测试人的ip
|
|
|
|
env = models.CharField(verbose_name='环境', max_length=10, null=False) # 电商平台 dspt 自营电商 zyds
|
|
|
|
request = models.CharField(verbose_name='请求链接', max_length=500, null=False)
|
|
|
|
response = models.CharField(verbose_name='返回值', max_length=10000, null=False)
|
|
|
|
request_datetime = models.DateTimeField(verbose_name='请求发送时间', null=False)
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.ip
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
verbose_name = '请求日志'
|
|
|
|
verbose_name_plural = '请求日志'
|
|
|
|
db_table = 'ec_request_log'
|
|
|
|
|
|
|
|
|
|
|
|
class EcApiGroup(models.Model):
|
|
|
|
id = models.IntegerField(primary_key=True)
|
|
|
|
group_id = models.CharField(verbose_name='接口分组id', max_length=20, null=False)
|
|
|
|
name = models.CharField(verbose_name='接口分组id', max_length=20, null=False)
|
|
|
|
api_id = models.CharField(verbose_name='接口id', max_length=2000, null=False)
|
|
|
|
type = models.CharField(verbose_name='会员非会员', max_length=20, default='', null=False) # 会员 member 非会员 nonmember
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.name
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
verbose_name = '接口组'
|
|
|
|
verbose_name_plural = '接口组'
|
|
|
|
db_table = 'ec_api_group'
|