flexdrivecode

package
v0.0.0-...-3e16b30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileIndex

type FileIndex struct {
	Id         int       `xorm:"not null pk autoincr comment('文件id') INT(10)"`
	FileName   string    `xorm:"not null default '' comment('文件名') VARCHAR(32)"`
	FileHash   string    `xorm:"not null default '' comment('文件内容哈希') VARCHAR(32)"`
	NodeId     int       `xorm:"not null default 0 comment('所在节点名 第一副本所在节点') INT(11)"`
	NodeId2    int       `xorm:"not null default 0 comment('所在节点名 第二副本所在节点') INT(11)"`
	NodeId3    int       `xorm:"not null default 0 comment('所在节点名 第三副本所在节点') INT(11)"`
	Path       string    `xorm:"not null default '' comment('文件文件') VARCHAR(256)"`
	Created    time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('创建时间') TIMESTAMP"`
	Updated    time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Status     int       `xorm:"not null default 1 comment('状态 0=未就绪 1=就绪 98=上传失败 99=删除') TINYINT(4)"`
	ReferCount int       `xorm:"not null default 0 comment('被引用数量') INT(11)"`
	Size       int       `xorm:"not null default 0 comment('大小 单位Byte') INT(11)"`
	Space      int       `xorm:"not null default 0 comment('占用空间单位 单位KB') INT(11)"`
	Desc       string    `xorm:"not null comment('描述信息') TEXT"`
}

func (*FileIndex) GetById

func (t *FileIndex) GetById(int id) error

func (FileIndex) TableName

func (t FileIndex) TableName() string

type Manager

type Manager struct {
	Id          int       `xorm:"not null pk autoincr comment('管理员id') INT(10)"`
	Name        string    `xorm:"not null default '' comment('管理员名称') VARCHAR(32)"`
	Phone       string    `xorm:"not null default '' comment('管理员手机号') VARCHAR(12)"`
	Email       string    `xorm:"not null default '' comment('管理员email') VARCHAR(32)"`
	Pwd         string    `xorm:"not null default '' comment('密码') VARCHAR(32)"`
	Created     time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('创建时间') TIMESTAMP"`
	Updated     time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Status      int       `xorm:"not null default 1 comment('状态 1=正常 99=删除') TINYINT(4)"`
	RoleId      int       `xorm:"not null default 0 comment('角色id') INT(11)"`
	IsSuper     int       `xorm:"not null default 0 comment('是否是超管 1=超管') TINYINT(4)"`
	LastLoginAt time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('最后登录时间') TIMESTAMP"`
	LastLoginIp string    `xorm:"not null default '' comment('最后登录ip') VARCHAR(16)"`
}

func (*Manager) GetById

func (t *Manager) GetById(int id) error

func (Manager) TableName

func (t Manager) TableName() string

type Node

type Node struct {
	Id             int       `xorm:"not null pk autoincr comment('主键id') INT(10)"`
	NodeName       string    `xorm:"not null comment('节点号') VARCHAR(16)"`
	TotalSpace     int64     `xorm:"not null default 0 comment('全部空间 单位KB') BIGINT(20)"`
	UsedSpace      int64     `xorm:"not null default 0 comment('使用的空间 单位KB') BIGINT(20)"`
	FileCount      int64     `xorm:"not null default 0 comment('文件数量') BIGINT(20)"`
	Remark         string    `xorm:"not null comment('房间备注') TEXT"`
	Created        time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('添加时间') TIMESTAMP"`
	Updated        time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Status         int       `xorm:"not null default 1 comment('状态 1=正常启用 2=注册超时 99=删除 ') TINYINT(4)"`
	LastRegistered time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('最后注册时间') TIMESTAMP"`
}

func (*Node) GetById

func (t *Node) GetById(int id) error

func (Node) TableName

func (t Node) TableName() string

type OperLog

type OperLog struct {
	Id          int       `xorm:"not null pk comment('操作记录id') INT(11)"`
	ManagerId   int       `xorm:"not null comment('操作员id 对应员工id') INT(11)"`
	ManagerName string    `xorm:"not null default '' comment('操作人名称') VARCHAR(32)"`
	OperBiz     string    `xorm:"not null comment('操作业务 枚举') VARCHAR(64)"`
	OperParams  string    `xorm:"not null comment('操作内容参数') TEXT"`
	Created     time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('操作时间') TIMESTAMP"`
	Updated     time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Status      int       `xorm:"not null default 1 comment('状态 1=正常') TINYINT(4)"`
}

func (*OperLog) GetById

func (t *OperLog) GetById(int id) error

func (OperLog) TableName

func (t OperLog) TableName() string

type Order

type Order struct {
	Id            int       `xorm:"not null pk autoincr comment('订单id') INT(10)"`
	UserId        int       `xorm:"not null comment('用户id') INT(11)"`
	OriginLevelId int       `xorm:"not null comment('用户原等级id') INT(11)"`
	AwardLevelId  int       `xorm:"not null default 0 comment('用户购买的等级id') INT(11)"`
	AwardSpace    int64     `xorm:"not null default 0 comment('本次购买的容量空间 单位KB') BIGINT(11)"`
	Phone         string    `xorm:"not null default '' comment('用户手机号') VARCHAR(12)"`
	LevelName     string    `xorm:"not null default '' comment('等级名') VARCHAR(12)"`
	TotalAmount   int       `xorm:"not null default 0 comment('订单价格 单位分') INT(11)"`
	PayAmount     int       `xorm:"not null default 0 comment('实付款金额 单位分') INT(11)"`
	Remark        string    `xorm:"not null comment('订单备注') TEXT"`
	Created       time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('创建时间') TIMESTAMP"`
	Updated       time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' TIMESTAMP"`
	Status        int       `xorm:"not null default 1 comment('状态 1=待付款 2=未付款关闭 3=已付款 4=已退款') TINYINT(4)"`
}

func (*Order) GetById

func (t *Order) GetById(int id) error

func (Order) TableName

func (t Order) TableName() string

type Role

type Role struct {
	Id      int       `xorm:"not null pk autoincr comment('角色id') INT(10)"`
	Name    string    `xorm:"not null default '' comment('角色名称') VARCHAR(32)"`
	Status  int       `xorm:"not null default 1 comment('状态 1=正常启用 99=删除') TINYINT(4)"`
	Created time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('创建时间') TIMESTAMP"`
	Updated time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Permit  string    `xorm:"not null comment('授权内容 json') TEXT"`
}

func (*Role) GetById

func (t *Role) GetById(int id) error

func (Role) TableName

func (t Role) TableName() string

type Share

type Share struct {
	Id       int       `xorm:"not null pk autoincr comment('文件id') INT(10)"`
	FileHash string    `xorm:"not null default '' comment('文件哈希') VARCHAR(32)"`
	UserId   int       `xorm:"not null default 0 comment('分享者用户id') INT(11)"`
	NodeId   int       `xorm:"not null default 0 comment('所在节点名') INT(11)"`
	FileName string    `xorm:"not null default '' comment('文件名') VARCHAR(32)"`
	Path     string    `xorm:"not null default '' comment('文件路径') VARCHAR(256)"`
	Created  time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('创建时间') TIMESTAMP"`
	Updated  time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Status   int       `xorm:"not null default 1 comment('状态 1=正常 2=隐藏 99=已删除') TINYINT(4)"`
	Expired  time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('分享有效期') TIMESTAMP"`
}

func (*Share) GetById

func (t *Share) GetById(int id) error

func (Share) TableName

func (t Share) TableName() string

type User

type User struct {
	Id          int       `xorm:"not null pk autoincr comment('用户id') INT(10)"`
	Name        string    `xorm:"not null default '' comment('用户姓名') VARCHAR(32)"`
	Email       string    `xorm:"not null comment('邮箱') VARCHAR(32)"`
	Phone       string    `xorm:"not null default '' comment('手机号 ') VARCHAR(12)"`
	Pwd         string    `xorm:"not null default '' comment('密码') VARCHAR(32)"`
	LevelId     int       `xorm:"not null default 0 comment('级别id') INT(11)"`
	TotalCharge int       `xorm:"not null default 0 comment('累计充值 单位分') INT(11)"`
	QuotaSpace  int64     `xorm:"not null default 0 comment('当前拥有的空间 单位KB') BIGINT(20)"`
	UsedSpace   int64     `xorm:"not null default 0 comment('当前已用空间 单位KB') BIGINT(20)"`
	FileCount   int64     `xorm:"not null default 0 comment('文件数量') BIGINT(20)"`
	LastLoginAt time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('最后登录时间') TIMESTAMP"`
	LastLoginIp string    `xorm:"not null default '' comment('最后登录ip') VARCHAR(16)"`
	Created     time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('创建时间') TIMESTAMP"`
	Updated     time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Status      int       `xorm:"not null default 1 comment('状态 1=正常启用 99=账户冻结 ') TINYINT(4)"`
}

func (*User) GetById

func (t *User) GetById(int id) error

func (User) TableName

func (t User) TableName() string

type UserFile

type UserFile struct {
	Id       int       `xorm:"not null pk autoincr comment('文件id') INT(10)"`
	UserId   string    `xorm:"not null default '' comment('用户id') unique(IDX_userId_pathhash) VARCHAR(32)"`
	Path     string    `xorm:"not null default '' comment('文件路径') VARCHAR(256)"`
	FileName string    `xorm:"not null default '' comment('文件名') VARCHAR(256)"`
	PathHash string    `xorm:"not null comment('路径哈希,hash(path+fileName),用户下唯一') unique(IDX_userId_pathhash) VARCHAR(32)"`
	FileHash string    `xorm:"not null default '' comment('文件哈希') VARCHAR(32)"`
	NodeId   int       `xorm:"not null default 0 comment('所在节点名 第一副本所在节点') INT(11)"`
	IsDir    int       `xorm:"not null default 0 comment('是否是目录') TINYINT(4)"`
	Created  time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('创建时间') TIMESTAMP"`
	Updated  time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Status   int       `xorm:"not null default 1 comment('状态 1=正常 2=隐藏 99=下架') TINYINT(4)"`
	Size     int       `xorm:"not null default 0 comment('大小 单位Byte 目录则记录0') INT(11)"`
	Space    int       `xorm:"not null default 0 comment('占用空间单位 单位KB 目录则记录0') INT(11)"`
	Desc     string    `xorm:"not null comment('描述信息') TEXT"`
}

func (*UserFile) GetById

func (t *UserFile) GetById(int id) error

func (UserFile) TableName

func (t UserFile) TableName() string

type UserLevel

type UserLevel struct {
	Id         int       `xorm:"not null pk autoincr comment('会员级别id') INT(10)"`
	Name       string    `xorm:"not null comment('会员级别名称') VARCHAR(32)"`
	QuotaSpace int64     `xorm:"not null default 0 comment('会员级别的用户空间 单位KB') BIGINT(20)"`
	Price      int       `xorm:"not null default 0 comment('会员级别的价格 单位分') INT(11)"`
	Created    time.Time `xorm:"not null default '1999-12-31 00:00:00' comment('创建时间') TIMESTAMP"`
	Updated    time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
	Status     int       `xorm:"not null default 1 comment('状态 1=启用 99=删除') TINYINT(4)"`
}

func (*UserLevel) GetById

func (t *UserLevel) GetById(int id) error

func (UserLevel) TableName

func (t UserLevel) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL