| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package mini_video_config
- import (
- "git.sxidc.com/go-framework/baize/framework/core/domain"
- "git.sxidc.com/go-framework/baize/framework/core/domain/entity"
- )
- const (
- FieldComponentID = "ComponentID"
- FieldVideoTitle = "VideoTitle"
- FieldVideoUrl = "VideoUrl"
- FieldVideoCover = "VideoCover"
- FieldVideoDuration = "VideoDuration"
- FieldAutoPlay = "AutoPlay"
- FieldShowControls = "ShowControls"
- FieldIsEnabled = "IsEnabled"
- )
- var fieldMap = map[string]string{
- FieldComponentID: "组件实例ID",
- FieldVideoTitle: "视频标题",
- FieldVideoUrl: "视频地址",
- FieldVideoCover: "视频封面",
- FieldVideoDuration: "视频时长(秒)",
- FieldAutoPlay: "是否自动播放",
- FieldShowControls: "是否显示控制器",
- FieldIsEnabled: "是否启用",
- }
- var (
- ColumnComponentID = domain.ColumnName(FieldComponentID)
- ColumnVideoTitle = domain.ColumnName(FieldVideoTitle)
- ColumnVideoUrl = domain.ColumnName(FieldVideoUrl)
- ColumnVideoCover = domain.ColumnName(FieldVideoCover)
- ColumnVideoDuration = domain.ColumnName(FieldVideoDuration)
- ColumnAutoPlay = domain.ColumnName(FieldAutoPlay)
- ColumnShowControls = domain.ColumnName(FieldShowControls)
- ColumnIsEnabled = domain.ColumnName(FieldIsEnabled)
- )
- type Entity struct {
- entity.Base
- ComponentID string `sqlmapping:"column:component_id;" sqlresult:"column:component_id;" check:"required,lte=32,when=create/update"`
- VideoTitle string `sqlmapping:"column:video_title;" sqlresult:"column:video_title;" check:"required,lte=200,when=create/update"`
- VideoUrl string `sqlmapping:"column:video_url;" sqlresult:"column:video_url;" check:"required,lte=500,when=create/update"`
- VideoCover string `sqlmapping:"column:video_cover;" sqlresult:"column:video_cover;" check:"required,lte=500,when=create/update"`
- VideoDuration int `sqlmapping:"column:video_duration;updateClear;" sqlresult:"column:video_duration;"`
- AutoPlay string `sqlmapping:"column:auto_play;" sqlresult:"column:auto_play;" check:"required,when=create/update"`
- ShowControls string `sqlmapping:"column:show_controls;" sqlresult:"column:show_controls;" check:"required,when=create/update"`
- IsEnabled string `sqlmapping:"column:is_enabled;" sqlresult:"column:is_enabled;" check:"required,lte=10,when=create/update"`
- entity.UserIDFields
- entity.OperatorUserNameField
- entity.TimeFields
- /* HAC: ENTITY RELATION FIELDS */
- /* HAC: END ENTITY RELATION FIELDS */
- }
- func (e *Entity) DomainCNName() string {
- return "宣传视频配置表"
- }
- func (e *Entity) DomainCamelName() string {
- return "MiniVideoConfig"
- }
- func (e *Entity) GetFieldMap() map[string]string {
- return fieldMap
- }
- /* HAC: ENTITY RELATION METHODS */
- /* HAC: END ENTITY RELATION METHODS */
|