models.py 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. import uuid
  2. from django.db import models
  3. from utils.models import BaseModel
  4. # Create your models here.
  5. # 图片上传
  6. def image_upload_to(instance, filename):
  7. return 'image/{filename}'.format(filename=str(uuid.uuid4().hex)+str(filename))
  8. # 富文本图片上传
  9. def image_upload_to_ditor(instance, filename):
  10. return 'editorimg/{filename}'.format(filename=str(uuid.uuid4().hex)+str(filename))
  11. # 富文本图片上传
  12. def image_upload_to_head(instance, filename):
  13. return 'headimg/{filename}'.format(filename=str(uuid.uuid4().hex)+str(filename))
  14. # 形象照上传
  15. def image_upload_to_visualize(instance, filename):
  16. return 'visualize/{filename}'.format(filename=str(uuid.uuid4().hex)+str(filename))
  17. # 组件预览图
  18. def image_upload_to_element(instance, filename):
  19. return 'elementstyleimage/{filename}'.format(filename=str(uuid.uuid4().hex)+str(filename))
  20. # 组件样式预览图
  21. def image_upload_to_style(instance, filename):
  22. return 'elementstyleimage/{filename}'.format(filename=str(uuid.uuid4().hex)+str(filename))
  23. # ==============================================================================================
  24. class Bar(BaseModel):
  25. authName = models.CharField(max_length=200, default='', verbose_name="菜单名称")
  26. path = models.CharField(max_length=200, default='', verbose_name="跳转路径")
  27. partment = models.ForeignKey(to='self',null=True,on_delete=models.CASCADE,verbose_name="所属父类", related_name="children")
  28. icon = models.CharField(max_length=200, default='', verbose_name="图标")
  29. class Meta:
  30. db_table = 'wn_bar'
  31. verbose_name = '菜单表'
  32. verbose_name_plural = verbose_name
  33. # ==============================================================================================
  34. def __str__(self):
  35. return self.authName
  36. def __unicode__(self):
  37. return self.authName
  38. class Navigation(BaseModel):
  39. name = models.CharField(max_length=200, default='', verbose_name="菜单名称")
  40. path = models.CharField(max_length=200, default='', verbose_name="跳转路径")
  41. partment = models.ForeignKey(to='self', null=True, on_delete=models.CASCADE, verbose_name="所属父类",
  42. related_name="children")
  43. icon = models.CharField(max_length=200, default='', verbose_name="图标")
  44. class Meta:
  45. db_table = 'web_navigation'
  46. verbose_name = '前台菜单表'
  47. verbose_name_plural = verbose_name
  48. def __str__(self):
  49. return self.name
  50. def __unicode__(self):
  51. return self.name
  52. class Company(BaseModel):
  53. name = models.CharField(max_length=200, default='', verbose_name="公司名称")
  54. imgurl = models.ImageField(default='', upload_to=image_upload_to, verbose_name='logo')
  55. class Meta:
  56. db_table = 'web_company'
  57. verbose_name = '公司名称'
  58. verbose_name_plural = verbose_name
  59. def __str__(self):
  60. return self.name
  61. def __unicode__(self):
  62. return self.name
  63. class Slideshow(BaseModel):
  64. imgurl = models.ImageField(default='', upload_to=image_upload_to, verbose_name='图片')
  65. url = models.CharField(default='',max_length=200,null=True,blank=True, verbose_name='跳转地址')
  66. sort = models.IntegerField(default=0,verbose_name='排序')
  67. class Meta:
  68. db_table = 'web_slideshow'
  69. verbose_name = '轮播图'
  70. verbose_name_plural = verbose_name
  71. def __str__(self):
  72. return self.id
  73. def __unicode__(self):
  74. return self.id
  75. class EditorImg(BaseModel):
  76. imgurl = models.ImageField(null=False, blank=False, upload_to=image_upload_to_ditor, verbose_name='图片')
  77. class Meta:
  78. db_table = 'web_editorimg'
  79. verbose_name = '富文本编辑器图片上传'
  80. verbose_name_plural = verbose_name
  81. class EditorContens(BaseModel):
  82. title = models.CharField(max_length=200,null=False, blank=False,verbose_name='标题')
  83. content = models.TextField(default='',verbose_name='内容')
  84. rem = models.CharField(max_length=200,default='',verbose_name='备注')
  85. class Meta:
  86. db_table = 'web_editor_contens'
  87. verbose_name = '富文本内容'
  88. verbose_name_plural = verbose_name
  89. def __str__(self):
  90. return self.title
  91. class Hmwe(BaseModel):
  92. title = models.CharField(max_length=200,null=False, blank=False,verbose_name='标题')
  93. content = models.TextField(default='',verbose_name='内容')
  94. rem = models.CharField(max_length=200,default='',verbose_name='备注')
  95. class Meta:
  96. db_table = 'web_mwe'
  97. verbose_name = '关于我们'
  98. verbose_name_plural = verbose_name
  99. def __str__(self):
  100. return self.title
  101. class Hmart(BaseModel):
  102. title = models.CharField(max_length=200,null=False, blank=False,verbose_name='标题')
  103. content = models.TextField(default='',verbose_name='内容')
  104. icon = models.CharField(max_length=200,default='',verbose_name='图标')
  105. rem = models.CharField(max_length=200,default='',verbose_name='备注')
  106. class Meta:
  107. db_table = 'web_hmart'
  108. verbose_name = '技术与服务'
  109. ordering = ['id']
  110. verbose_name_plural = verbose_name
  111. def __str__(self):
  112. return self.title
  113. class Column(BaseModel):
  114. title = models.CharField(max_length=200,null=False, blank=False,verbose_name='标题')
  115. content = models.TextField(default='',verbose_name='内容')
  116. imgurl = models.CharField(max_length=200,null=True, blank=True,default='', verbose_name='图片')
  117. srot = models.IntegerField(null=True, blank=True,default=1, verbose_name='排序')
  118. class Meta:
  119. db_table = 'web_column'
  120. ordering = ['srot']
  121. verbose_name = '栏目标签'
  122. verbose_name_plural = verbose_name
  123. def __str__(self):
  124. return self.title
  125. class Hmcase(BaseModel):
  126. company = models.CharField(max_length=200,null=False, blank=False,verbose_name='公司')
  127. artisan = models.TextField(default='',verbose_name='项目')
  128. signatory = models.CharField(max_length=200,default='',verbose_name='签单人')
  129. satisfaction = models.CharField(max_length=200,default='',verbose_name='满意度')
  130. words = models.CharField(max_length=200,default='',verbose_name='谢辞')
  131. signatory_time = models.DateTimeField(auto_now_add=True, verbose_name="签单日期")
  132. rem = models.CharField(max_length=200,default='',verbose_name='备注')
  133. class Meta:
  134. db_table = 'web_hmcase'
  135. ordering = ['-id']
  136. verbose_name = '成功案例'
  137. verbose_name_plural = verbose_name
  138. def __str__(self):
  139. return self.company
  140. class Hmgroup(BaseModel):
  141. name = models.CharField(max_length=200,null=False, blank=False,verbose_name='姓名')
  142. imgurl = models.ImageField(null=True, blank=True, upload_to=image_upload_to_visualize, verbose_name='图片')
  143. intro = models.TextField(default='',verbose_name='简介')
  144. class Meta:
  145. db_table = 'web_hmgroup'
  146. verbose_name = '团队介绍'
  147. ordering = ['-id']
  148. verbose_name_plural = verbose_name
  149. def __str__(self):
  150. return self.name
  151. class Hmaddress(BaseModel):
  152. content = models.CharField(max_length=200,null=False, blank=False,verbose_name='详细信息')
  153. add = models.CharField(max_length=200,null=False, blank=False,verbose_name='地址')
  154. tel = models.CharField(max_length=200,null=False, blank=False,verbose_name='电话')
  155. class Meta:
  156. db_table = 'web_hmaddress'
  157. verbose_name = '联系地址'
  158. verbose_name_plural = verbose_name
  159. def __str__(self):
  160. return self.content
  161. # =======================================================================================================================
  162. # 所有组件表
  163. class WnComponentModel(BaseModel):
  164. coding = models.CharField(max_length=200, null=True, blank=True, verbose_name='组件编码')
  165. name = models.CharField(max_length=200, null=True, blank=True, verbose_name='组件名称')
  166. imgurl = models.ImageField(null=True, blank=True, upload_to=image_upload_to_style, verbose_name='图片')
  167. type = models.CharField(max_length=200, null=True, blank=True, verbose_name='所属类别')
  168. class Meta:
  169. db_table = 'wn_component'
  170. verbose_name = '组件表'
  171. verbose_name_plural = verbose_name
  172. def __str__(self):
  173. return self.name
  174. # 使用的组件
  175. class WnComponentKeyModel(BaseModel):
  176. coding = models.CharField(max_length=200, null=True, blank=True, verbose_name='组件编码')
  177. codingname = models.CharField(max_length=200, null=True, blank=True, verbose_name='组件名称')
  178. name = models.CharField(max_length=200, null=True, blank=True, verbose_name='标题名称')
  179. statuscss = models.CharField(max_length=200, null=True, blank=True, verbose_name='使用的组件样式id')
  180. componentimgurl = models.CharField(max_length=200,null=True, blank=True, verbose_name='组件图片')
  181. styleimgurl = models.CharField(max_length=200,null=True, blank=True, verbose_name='组件样式图片')
  182. sort = models.IntegerField(null=True, blank=True, verbose_name='排序')
  183. class Meta:
  184. db_table = 'wn_componentkey'
  185. verbose_name = '使用中的组件'
  186. verbose_name_plural = verbose_name
  187. def __str__(self):
  188. return self.name
  189. # 组件样式分组
  190. class WnComponentCssGroupModel(BaseModel):
  191. coding = models.CharField(max_length=200, null=True, blank=True, verbose_name='组件编码')
  192. component = models.TextField(null=True, blank=True, verbose_name='使用组件名称')
  193. manner = models.TextField(null=True, blank=True, verbose_name='风格')
  194. styleimgurl = models.ImageField(null=True, blank=True, upload_to=image_upload_to_style,verbose_name='组件样式图片')
  195. spare1 = models.TextField(null=True, blank=True, verbose_name='备用字段1')
  196. spare2 = models.TextField(null=True, blank=True, verbose_name='备用字段2')
  197. spare3 = models.TextField( null=True, blank=True, verbose_name='备用字段3')
  198. # componentkey = models.ForeignKey(WnComponentKeyModel, on_delete=models.CASCADE, verbose_name='使用的组件id')
  199. element_border = models.TextField( null=True, blank=True, verbose_name='元素边框')
  200. element_padding = models.TextField(null=True, blank=True, verbose_name='元素内边距')
  201. element_margin = models.TextField(null=True, blank=True, verbose_name='元素外边距')
  202. element_background_color = models.TextField(null=True, blank=True, verbose_name='元素背景颜色')
  203. element_font = models.TextField( null=True, blank=True, verbose_name='元素字体大小')
  204. element_box_shadow = models.TextField( null=True, blank=True, verbose_name='元素元素阴影')
  205. element_text_shadow = models.TextField(null=True, blank=True, verbose_name='元素文字阴影')
  206. element_border_radius = models.TextField(null=True, blank=True, verbose_name='元素元素圆角')
  207. # =================================================总体的
  208. # --原始的
  209. total_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始边框')
  210. total_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始内边距')
  211. total_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始外边距')
  212. total_d_background_color = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始背景颜色')
  213. total_d_font = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始字体大小')
  214. total_d_box_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始元素阴影')
  215. total_d_text_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始文字阴影')
  216. total_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始元素圆角')
  217. total_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始透明度')
  218. total_d_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始过渡')
  219. total_d_transition_duration = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始过渡时间')
  220. total_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体原始动画')
  221. # --鼠标移上去的
  222. total_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中边框')
  223. total_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中内边距')
  224. total_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中外边距')
  225. total_h_background_color = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中背景颜色')
  226. total_h_font = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中字体大小')
  227. total_h_box_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中元素阴影')
  228. total_h_text_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中文字阴影')
  229. total_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中元素圆角')
  230. total_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中透明度')
  231. total_h_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中过渡')
  232. total_h_transition_duration = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体过渡选中时间')
  233. total_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中动画')
  234. # list=====================================列表
  235. # --原始的
  236. list_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始边框')
  237. list_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始内边距')
  238. list_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始外边距')
  239. list_d_background_color = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始背景颜色')
  240. list_d_font = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始字体大小')
  241. list_d_box_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始元素阴影')
  242. list_d_text_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始文字阴影')
  243. list_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始元素圆角')
  244. list_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始透明度')
  245. list_d_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始过渡')
  246. list_d_transition_duration = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始过渡时间')
  247. list_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始动画')
  248. # --鼠标移上去的
  249. list_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中边框')
  250. list_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中内边距')
  251. list_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中外边距')
  252. list_h_background_color = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中背景颜色')
  253. list_h_font = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中字体大小')
  254. list_h_box_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中元素阴影')
  255. list_h_text_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中文字阴影')
  256. list_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中元素圆角')
  257. list_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中透明度')
  258. list_h_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中过渡')
  259. list_h_transition_duration = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表过渡选中时间')
  260. list_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中动画')
  261. # crucial ============================重要的图片区
  262. # 原始的
  263. crucial_img_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始边框')
  264. crucial_img_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始内边距')
  265. crucial_img_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始外边距')
  266. crucial_img_d_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始元素阴影')
  267. crucial_img_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始元素圆角')
  268. crucial_img_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始透明度')
  269. crucial_img_d_transition_property = models.CharField(max_length=200, null=True, blank=True,
  270. verbose_name='重要图片原始过渡')
  271. crucial_img_d_transition_duration = models.CharField(max_length=200, null=True, blank=True,
  272. verbose_name='重要图片原始过渡选中时间')
  273. crucial_img_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始动画')
  274. # 选中的
  275. crucial_img_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中边框')
  276. crucial_img_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中内边距')
  277. crucial_img_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中外边距')
  278. crucial_img_h_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中元素阴影')
  279. crucial_img_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中元素圆角')
  280. crucial_img_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中透明度')
  281. crucial_img_h_transition_property = models.CharField(max_length=200, null=True, blank=True,
  282. verbose_name='重要图片选中过渡')
  283. crucial_img_h_transition_duration = models.CharField(max_length=200, null=True, blank=True,
  284. verbose_name='重要图片选中过渡选中时间')
  285. crucial_img_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中动画')
  286. # medium ==============================中等的图片区
  287. # 原始的
  288. medium_img_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始边框')
  289. medium_img_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始内边距')
  290. medium_img_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始外边距')
  291. medium_img_d_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始元素阴影')
  292. medium_img_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始元素圆角')
  293. medium_img_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始透明度')
  294. medium_img_d_transition_property = models.CharField(max_length=200, null=True, blank=True,
  295. verbose_name='中等图片原始过渡')
  296. medium_img_d_transition_duration = models.CharField(max_length=200, null=True, blank=True,
  297. verbose_name='中等图片原始过渡选中时间')
  298. medium_img_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始动画')
  299. # 选中的
  300. medium_img_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中边框')
  301. medium_img_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中内边距')
  302. medium_img_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中外边距')
  303. medium_img_h_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中元素阴影')
  304. medium_img_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中元素圆角')
  305. medium_img_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中透明度')
  306. medium_img_h_transition_property = models.CharField(max_length=200, null=True, blank=True,
  307. verbose_name='中等图片选中过渡')
  308. medium_img_h_transition_duration = models.CharField(max_length=200, null=True, blank=True,
  309. verbose_name='中等图片选中过渡选中时间')
  310. medium_img_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中动画')
  311. # minor =============================================================================次要的图片区
  312. # 原始的
  313. minor_img_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始边框')
  314. minor_img_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始内边距')
  315. minor_img_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始外边距')
  316. minor_img_d_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始元素阴影')
  317. minor_img_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始元素圆角')
  318. minor_img_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始透明度')
  319. minor_img_d_transition_property = models.CharField(max_length=200, null=True, blank=True,
  320. verbose_name='次要图片原始过渡')
  321. minor_img_d_transition_duration = models.CharField(max_length=200, null=True, blank=True,
  322. verbose_name='次要图片原始过渡选中时间')
  323. minor_img_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始动画')
  324. # 选中的
  325. minor_img_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中边框')
  326. minor_img_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中内边距')
  327. minor_img_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中外边距')
  328. minor_img_h_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中元素阴影')
  329. minor_img_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中元素圆角')
  330. minor_img_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中透明度')
  331. minor_img_h_transition_property = models.CharField(max_length=200, null=True, blank=True,
  332. verbose_name='次要图片选中过渡')
  333. minor_img_h_transition_duration = models.CharField(max_length=200, null=True, blank=True,
  334. verbose_name='次要图片选中过渡选中时间')
  335. minor_img_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中动画')
  336. class Meta:
  337. db_table = 'wn_componentcssgroup'
  338. verbose_name = '组件样式分组'
  339. verbose_name_plural = verbose_name
  340. def __str__(self):
  341. return self.component
  342. # 组件样式设置
  343. class WnComponentCssModel(BaseModel):
  344. coding = models.CharField(max_length=200,null=True, blank=True,verbose_name='组件编码')
  345. component = models.CharField(max_length=200,null=True, blank=True,verbose_name='使用组件名称')
  346. spare1 = models.TextField(null=True, blank=True, verbose_name='备用字段1')
  347. spare2 = models.TextField(null=True, blank=True, verbose_name='备用字段2')
  348. spare3 = models.TextField(null=True, blank=True, verbose_name='备用字段3')
  349. componentkey = models.ForeignKey(WnComponentKeyModel, on_delete=models.CASCADE, verbose_name='使用的组件id')
  350. element_border = models.TextField(null=True, blank=True, verbose_name='元素边框')
  351. element_padding = models.TextField(null=True, blank=True, verbose_name='元素内边距')
  352. element_margin = models.TextField(null=True, blank=True, verbose_name='元素外边距')
  353. element_background_color = models.TextField(null=True, blank=True, verbose_name='元素背景颜色')
  354. element_font = models.TextField(null=True, blank=True, verbose_name='元素字体大小')
  355. element_box_shadow = models.TextField(null=True, blank=True, verbose_name='元素元素阴影')
  356. element_text_shadow = models.TextField(null=True, blank=True, verbose_name='元素文字阴影')
  357. element_border_radius = models.TextField(null=True, blank=True, verbose_name='元素元素圆角')
  358. # =================================================总体的
  359. # --原始的
  360. total_d_border = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始边框')
  361. total_d_padding = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始内边距')
  362. total_d_margin = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始外边距')
  363. total_d_background_color = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始背景颜色')
  364. total_d_font = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始字体大小')
  365. total_d_box_shadow = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始元素阴影')
  366. total_d_text_shadow = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始文字阴影')
  367. total_d_border_radius = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始元素圆角')
  368. total_d_opacity = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始透明度')
  369. total_d_transition_property = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始过渡')
  370. total_d_transition_duration = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始过渡时间')
  371. total_d_animation = models.CharField(max_length=200,null=True, blank=True,verbose_name='总体原始动画')
  372. # --鼠标移上去的
  373. total_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中边框')
  374. total_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中内边距')
  375. total_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中外边距')
  376. total_h_background_color = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中背景颜色')
  377. total_h_font = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中字体大小')
  378. total_h_box_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中元素阴影')
  379. total_h_text_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中文字阴影')
  380. total_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中元素圆角')
  381. total_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中透明度')
  382. total_h_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中过渡')
  383. total_h_transition_duration = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体过渡选中时间')
  384. total_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='总体选中动画')
  385. # list=====================================列表
  386. # --原始的
  387. list_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始边框')
  388. list_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始内边距')
  389. list_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始外边距')
  390. list_d_background_color = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始背景颜色')
  391. list_d_font = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始字体大小')
  392. list_d_box_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始元素阴影')
  393. list_d_text_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始文字阴影')
  394. list_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始元素圆角')
  395. list_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始透明度')
  396. list_d_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始过渡')
  397. list_d_transition_duration = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始过渡时间')
  398. list_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表原始动画')
  399. # --鼠标移上去的
  400. list_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中边框')
  401. list_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中内边距')
  402. list_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中外边距')
  403. list_h_background_color = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中背景颜色')
  404. list_h_font = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中字体大小')
  405. list_h_box_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中元素阴影')
  406. list_h_text_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中文字阴影')
  407. list_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中元素圆角')
  408. list_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中透明度')
  409. list_h_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中过渡')
  410. list_h_transition_duration = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表过渡选中时间')
  411. list_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='列表选中动画')
  412. # crucial ============================重要的图片区
  413. # 原始的
  414. crucial_img_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始边框')
  415. crucial_img_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始内边距')
  416. crucial_img_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始外边距')
  417. crucial_img_d_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始元素阴影')
  418. crucial_img_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始元素圆角')
  419. crucial_img_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始透明度')
  420. crucial_img_d_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始过渡')
  421. crucial_img_d_transition_duration = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始过渡选中时间')
  422. crucial_img_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片原始动画')
  423. # 选中的
  424. crucial_img_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中边框')
  425. crucial_img_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中内边距')
  426. crucial_img_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中外边距')
  427. crucial_img_h_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中元素阴影')
  428. crucial_img_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中元素圆角')
  429. crucial_img_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中透明度')
  430. crucial_img_h_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中过渡')
  431. crucial_img_h_transition_duration = models.CharField(max_length=200, null=True, blank=True,verbose_name='重要图片选中过渡选中时间')
  432. crucial_img_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='重要图片选中动画')
  433. # medium ==============================中等的图片区
  434. # 原始的
  435. medium_img_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始边框')
  436. medium_img_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始内边距')
  437. medium_img_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始外边距')
  438. medium_img_d_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始元素阴影')
  439. medium_img_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始元素圆角')
  440. medium_img_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始透明度')
  441. medium_img_d_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始过渡')
  442. medium_img_d_transition_duration = models.CharField(max_length=200, null=True, blank=True,verbose_name='中等图片原始过渡选中时间')
  443. medium_img_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片原始动画')
  444. # 选中的
  445. medium_img_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中边框')
  446. medium_img_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中内边距')
  447. medium_img_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中外边距')
  448. medium_img_h_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中元素阴影')
  449. medium_img_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中元素圆角')
  450. medium_img_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中透明度')
  451. medium_img_h_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中过渡')
  452. medium_img_h_transition_duration = models.CharField(max_length=200, null=True, blank=True,verbose_name='中等图片选中过渡选中时间')
  453. medium_img_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='中等图片选中动画')
  454. # minor =============================================================================次要的图片区
  455. # 原始的
  456. minor_img_d_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始边框')
  457. minor_img_d_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始内边距')
  458. minor_img_d_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始外边距')
  459. minor_img_d_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始元素阴影')
  460. minor_img_d_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始元素圆角')
  461. minor_img_d_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始透明度')
  462. minor_img_d_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始过渡')
  463. minor_img_d_transition_duration = models.CharField(max_length=200, null=True, blank=True,
  464. verbose_name='次要图片原始过渡选中时间')
  465. minor_img_d_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片原始动画')
  466. # 选中的
  467. minor_img_h_border = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中边框')
  468. minor_img_h_padding = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中内边距')
  469. minor_img_h_margin = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中外边距')
  470. minor_img_h_shadow = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中元素阴影')
  471. minor_img_h_border_radius = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中元素圆角')
  472. minor_img_h_opacity = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中透明度')
  473. minor_img_h_transition_property = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中过渡')
  474. minor_img_h_transition_duration = models.CharField(max_length=200, null=True, blank=True,verbose_name='次要图片选中过渡选中时间')
  475. minor_img_h_animation = models.CharField(max_length=200, null=True, blank=True, verbose_name='次要图片选中动画')
  476. class Meta:
  477. db_table = 'wn_componentcss'
  478. verbose_name = '组件样式'
  479. verbose_name_plural = verbose_name
  480. def __str__(self):
  481. return self.component
  482. # 幻灯片组件的内容
  483. class WnSlideshowModel(BaseModel):
  484. title = models.CharField(max_length=200, null=True, blank=True, verbose_name='标题')
  485. content = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  486. imgurl = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  487. url = models.CharField(max_length=200, null=True, blank=True, verbose_name='跳转地址')
  488. componentkey = models.CharField(max_length=200, null=True, blank=True, verbose_name='归属id')
  489. class Meta:
  490. db_table = 'wn_slideshow'
  491. verbose_name = '幻灯片内容'
  492. verbose_name_plural = verbose_name
  493. def __str__(self):
  494. return self.title
  495. # 内容中心组件的内容
  496. class WnContentModel(BaseModel):
  497. content1 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  498. imgurl1 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  499. content2 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  500. imgurl2 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  501. content3 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  502. imgurl3 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  503. content4 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  504. imgurl4 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  505. content5 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  506. imgurl5 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  507. content6 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  508. imgurl6 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  509. content7 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  510. imgurl7 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  511. content8 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  512. imgurl8 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  513. content9 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  514. imgurl9 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  515. content10 = models.CharField(max_length=200, null=True, blank=True, verbose_name='内容')
  516. imgurl10 = models.ImageField(null=True, blank=True, upload_to=image_upload_to_ditor, verbose_name='图片')
  517. class Meta:
  518. db_table = 'wn_content'
  519. verbose_name = '内容中心区'
  520. verbose_name_plural = verbose_name
  521. def __str__(self):
  522. return self.id