|
package stage
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
/*
|
|
class LayoutScreen(DeclarativeDeneb):
|
|
__tablename__ = "stage_layout_screens"
|
|
# { Columns
|
|
id = Column(UUID, primary_key=True, default=func.uuid_generate_v4())
|
|
groupName = Column('group_name', String(16), nullable=False, default="17-1D")
|
|
# fitScreen = Column('fit_screen', String(64), nullable=False, default="*")
|
|
width = Column('width', Integer, nullable=False, default=1280)
|
|
height = Column('height', Integer, nullable=False, default=720)
|
|
created = Column(DateTime, nullable=False, default=func.NOW())
|
|
updated = Column(DateTime, nullable=False, default=func.NOW())
|
|
# }
|
|
frames = relationship('LayoutFrame', uselist=True, backref=backref("screen"))
|
|
*/
|
|
const LAYOUTSCREEN = "stage_layout_screens"
|
|
type LayoutScreen struct {
|
|
Id string `json:"id" xml:"-" xql:"id,pk"`
|
|
Tag string `json:"tag" xml:"-"`
|
|
Width int `json:"width" xml:"width,attr"`
|
|
Height int `json:"height" xml:"height,attr"`
|
|
Created *time.Time `json:"created,omitempty" xml:"-"`
|
|
Updated *time.Time `json:"updated,omitempty" xml:"-"`
|
|
}
|
|
/*
|
|
class LayoutFrame(DeclarativeDeneb):
|
|
__tablename__ = "stage_layout_frames"
|
|
# { Columns
|
|
id = Column(UUID, primary_key=True, default=func.uuid_generate_v4())
|
|
index = Column('idx', SmallInteger, nullable=False, default=1)
|
|
title = Column(Unicode(32), nullable=False, default=u"")
|
|
icon = Column(String(256), nullable=False, default="")
|
|
padding = Column(SmallInteger, nullable=False, default=1)
|
|
cellWidth = Column('cell_width', SmallInteger, nullable=False, default=190)
|
|
cellHeight = Column('cell_height', SmallInteger, nullable=False, default=160)
|
|
bgImage = Column('bg_image', String(256), nullable=False, default="")
|
|
screenId = Column('screen_id', UUID,
|
|
ForeignKey(LayoutScreen.__tablename__ + '.id', onupdate="CASCADE", ondelete="CASCADE"),
|
|
nullable=False)
|
|
created = Column(DateTime, nullable=False, default=func.NOW())
|
|
updated = Column(DateTime, nullable=False, default=func.NOW())
|
|
# }
|
|
rows = relationship('LayoutRow',
|
|
uselist=True,
|
|
backref=backref("frame"))
|
|
*/
|
|
const LAYOUTFRAME = "stage_layout_frames"
|
|
type LayoutFrame struct {
|
|
Id string `json:"id" xml:"-" xql:"id,pk"`
|
|
Index int16 `json:"index" xql:"idx" xml:"-"`
|
|
Title string `json:"title" xml:"title,attr"`
|
|
Icon string `json:"icon" xml:"icon,attr"`
|
|
Padding int16 `xml:"padding,attr" json:"padding"`
|
|
CellWidth int16 `xml:"cellWidth,attr" json:"cellWidth"`
|
|
CellHeight int16 `xml:"cellHeight,attr" json:"cellHeight"`
|
|
BackgroundImage string `xml:"bgImage,attr" json:"bgImage" xql:"bg_image"`
|
|
ScreenId string `json:"screenId" xql:"screen_id" xml:"-"`
|
|
Created *time.Time `json:"created,omitempty" xml:"-"`
|
|
Updated *time.Time `json:"updated,omitempty" xml:"-"`
|
|
}
|
|
/*
|
|
class LayoutRow(DeclarativeDeneb):
|
|
__tablename__ = "stage_layout_rows"
|
|
# { Columns
|
|
id = Column(UUID, primary_key=True, default=func.uuid_generate_v4())
|
|
index = Column('idx', SmallInteger, nullable=False, default=1)
|
|
width = Column(SmallInteger, nullable=False, default=0)
|
|
height = Column(SmallInteger, nullable=False, default=160)
|
|
frameId = Column('frame_id', UUID,
|
|
ForeignKey(LayoutFrame.__tablename__ + '.id', onupdate="CASCADE", ondelete="CASCADE"),
|
|
nullable=False)
|
|
created = Column(DateTime, nullable=False, default=func.NOW())
|
|
updated = Column(DateTime, nullable=False, default=func.NOW())
|
|
# }
|
|
cells = relationship('LayoutCell',
|
|
uselist=True,
|
|
backref=backref("row"))
|
|
*/
|
|
const LAYOUTROW = "stage_layout_rows"
|
|
type LayoutRow struct {
|
|
Id string `xml:"-" json:"id" xql:"id,pk"`
|
|
Index int16 `xml:"-" json:"index" xql:"idx"`
|
|
Title string `xml:"title,attr" json:"title" xql:"-"`
|
|
Width int16 `xml:"height,attr" json:"Width"`
|
|
Height int16 `xml:"width,attr" json:"Height"`
|
|
FrameId string `xml:"-" json:"frameId"`
|
|
Created *time.Time `xml:"-" json:"created,omitempty"`
|
|
Updated *time.Time `xml:"-" json:"updated,omitempty"`
|
|
}
|
|
/*
|
|
class LayoutCell(DeclarativeDeneb):
|
|
__tablename__ = "stage_layout_cells"
|
|
# { Columns
|
|
id = Column(UUID, primary_key=True, default=func.uuid_generate_v4())
|
|
index = Column('idx', SmallInteger, nullable=False, default=1)
|
|
image = Column(String(256), nullable=False, default="")
|
|
action = Column(String(256), nullable=False, default="")
|
|
title = Column(Unicode(32), nullable=False, default=u"")
|
|
showTitle = Column('show_title', SmallInteger, nullable=False, default=0)
|
|
# -1: never display, 0: display when focus, 1: always display
|
|
textSize = Column('text_size', SmallInteger, nullable=False, default=15)
|
|
textColor = Column('text_color', String(16), nullable=False, default="#FFFFFF")
|
|
textBackground = Column('text_bg', String(16), nullable=False, default="#000000")
|
|
cellBackground = Column('cell_bg', String(16), nullable=False, default="#000000")
|
|
colSpan = Column('col_span', SmallInteger, nullable=False, default=1)
|
|
rowSpan = Column('row_span', SmallInteger, nullable=False, default=1)
|
|
rowId = Column('row_id', UUID,
|
|
ForeignKey(LayoutRow.__tablename__ + '.id', onupdate="CASCADE", ondelete="CASCADE"),
|
|
nullable=False)
|
|
created = Column(DateTime, nullable=False, default=func.NOW())
|
|
updated = Column(DateTime, nullable=False, default=func.NOW())
|
|
# }
|
|
*/
|
|
const LAYOUTCELL = "stage_layout_cells"
|
|
type LayoutCell struct {
|
|
Id string `json:"id" xml:"-" xql:"id,pk"`
|
|
Index int16 `json:"index" xql:"idx" xml:"-"`
|
|
//Name string `xml:"name,attr" json:"name"`
|
|
Image string `xml:"img,attr" json:"image"`
|
|
Action string `xml:"action,attr" json:"action"`
|
|
Title string `xml:",innerxml" json:"title"`
|
|
ShowTitle int16 `xml:"showTitle,attr" json:"showTitle"`
|
|
TextSize int16 `xml:"textSize,attr" json:"textSize"`
|
|
TextColor string `xml:"textColor,attr" json:"textColor"`
|
|
TextBackground string `xml:"textBackground,attr" json:"textBackground" xql:"text_bg"`
|
|
CellBackground string `xml:"cellBackground,attr" json:"cellBackground" xql:"cell_bg"`
|
|
ColSpan int16 `xml:"colspan,attr" json:"colSpan"`
|
|
RowSpan int16 `xml:"rowspan,attr" json:"rowSpan"`
|
|
RowId string `json:"rowId" xml:"-"`
|
|
Created *time.Time `json:"created,omitempty" xml:"-"`
|
|
Updated *time.Time `json:"updated,omitempty" xml:"-"`
|
|
}
|
|
/*
|
|
class LayoutSplash(DeclarativeDeneb):
|
|
__tablename__ = "stage_layout_splashes"
|
|
# { Columns
|
|
id = Column(UUID, primary_key=True, default=func.uuid_generate_v4())
|
|
groupName = Column('group_name', String(16), nullable=False, default="17-1D")
|
|
# fitScreen = Column('fit_screen', String(64), nullable=False, default="*")
|
|
description = Column(Unicode(256), nullable=True)
|
|
created = Column(DateTime, nullable=False, default=func.NOW())
|
|
updated = Column(DateTime, nullable=False, default=func.NOW())
|
|
# }
|
|
media = relationship('SplashMedia', uselist=False, backref=backref("splash"))
|
|
*/
|
|
const LAYOUTSPLASH = "stage_layout_splashes"
|
|
type LayoutSplash struct {
|
|
Id string `xml:"-" json:"id" xql:"id,pk"`
|
|
Tag string `xml:"-" json:"tag"`
|
|
Description string `xml:"description" json:"description"`
|
|
Created *time.Time `xml:"-" json:"created,omitempty"`
|
|
Updated *time.Time `xml:"-" json:"updated,omitempty"`
|
|
}
|
|
/*
|
|
class LayoutSplashMedia(DeclarativeDeneb):
|
|
__tablename__ = "stage_layout_splash_medias"
|
|
# { Columns
|
|
id = Column(UUID, primary_key=True, default=func.uuid_generate_v4())
|
|
mode = Column(String(24), nullable=False, default="")
|
|
loops = Column(SmallInteger, nullable=False, default=1)
|
|
splashId = Column('splash_id', UUID,
|
|
ForeignKey(Splash.__tablename__ + '.id', onupdate="CASCADE", ondelete="CASCADE"),
|
|
nullable=False)
|
|
created = Column(DateTime, nullable=False, default=func.NOW())
|
|
updated = Column(DateTime, nullable=False, default=func.NOW())
|
|
# }
|
|
images = relationship('SplashImage', uselist=True, backref=backref("media"))
|
|
*/
|
|
const LAYOUTSPLASHMEDIA = "stage_layout_splash_medias"
|
|
type LayoutSplashMedia struct {
|
|
Id string `xml:"-" json:"id" xql:"id,pk"`
|
|
Mode string `xml:"mode,attr" json:"mode"`
|
|
Loops uint `xml:"loops,attr" json:"loops"`
|
|
SplashId string `xml:"-" json:"splashId"`
|
|
Created *time.Time `xml:"-" json:"created,omitempty"`
|
|
Updated *time.Time `xml:"-" json:"updated,omitempty"`
|
|
}
|
|
/*
|
|
class LayoutSplashImage(DeclarativeDeneb):
|
|
__tablename__ = "stage_layout_splash_images"
|
|
# { Columns
|
|
id = Column(UUID, primary_key=True, default=func.uuid_generate_v4())
|
|
index = Column('idx', SmallInteger, nullable=False, default=1)
|
|
source = Column(String(256), nullable=False, default="")
|
|
mode = Column(String(24), nullable=False, default="center")
|
|
text = Column(UnicodeText, nullable=True)
|
|
duration = Column(SmallInteger, nullable=False, default=1)
|
|
mediaId = Column('media_id', UUID,
|
|
ForeignKey(SplashMedia.__tablename__ + '.id', onupdate="CASCADE", ondelete="CASCADE"),
|
|
nullable=False)
|
|
created = Column(DateTime, nullable=False, default=func.NOW())
|
|
updated = Column(DateTime, nullable=False, default=func.NOW())
|
|
# }
|
|
*/
|
|
const LAYOUTSPLASHIMAGE = "stage_layout_splash_images"
|
|
type LayoutSplashImage struct {
|
|
Id string `xml:"-" json:"id" xql:"id,pk"`
|
|
Index int16 `xml:"-" json:"index" xql:"idx"`
|
|
Source string `xml:"src,attr" json:"source"`
|
|
Mode string `xml:"mode,attr" json:"mode"`
|
|
Text string `xml:",innerxml" json:"text"`
|
|
Duration uint `xml:"duration,attr" json:"duration"`
|
|
MediaId string `xml:"-" json:"mediaId"`
|
|
Created *time.Time `xml:"-" json:"created,omitempty"`
|
|
Updated *time.Time `xml:"-" json:"updated,omitempty"`
|
|
}
|