初始化v1

This commit is contained in:
2025-08-03 00:11:15 +08:00
commit b88c8b8afa
171 changed files with 22353 additions and 0 deletions

View File

View File

@@ -0,0 +1,25 @@
package entity
// NlAdmin 管理员表
type NlAdmin struct {
Id uint `json:"id" orm:"id,primary"` // 管理员ID
OpenId string `json:"open_id" orm:"open_id"` // OpenID用于第三方登录
Username string `json:"username" orm:"username"` // 用户名
JobNumber string `json:"job_number" orm:"job_number"` // 工号
Avatar string `json:"avatar" orm:"avatar"` // 头像
NickName string `json:"nick_name" orm:"nick_name"` // 昵称
Password string `json:"-" orm:"password"` // 密码
Phone string `json:"phone" orm:"phone"` // 手机号
Email string `json:"email" orm:"email"` // 邮箱
RoleId int `json:"role_id" orm:"role_id"` // 角色ID
Department string `json:"department" orm:"department"` // 部门
RegIp int64 `json:"reg_ip" orm:"reg_ip"` // 注册IP
LastLoginTime int `json:"last_login_time" orm:"last_login_time"` // 最后登录时间
LastLoginIp int64 `json:"last_login_ip" orm:"last_login_ip"` // 最后登录IP
OperationPassword string `json:"operation_password" orm:"operation_password"` // 操作密码
Desc string `json:"desc" orm:"desc"` // 备注
Status int `json:"status" orm:"status"` // 状态 1正常 0禁用
CreatedAt int `json:"created_at" orm:"created_at"` // 创建时间
UpdatedAt int `json:"updated_at" orm:"updated_at"` // 更新时间
DeletedAt int `json:"deleted_at" orm:"deleted_at"` // 删除时间
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// AdminLog is the golang structure for table nl_admin_log.
type AdminLog struct {
Id uint `json:"id" orm:"id" description:"日志ID"`
AdminId int `json:"admin_id" orm:"admin_id" description:"管理员ID"`
Action string `json:"action" orm:"action" description:"操作动作"`
Module string `json:"module" orm:"module" description:"操作模块"`
Content string `json:"content" orm:"content" description:"操作内容"`
Ip string `json:"ip" orm:"ip" description:"IP地址"`
UserAgent string `json:"user_agent" orm:"user_agent" description:"用户代理"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
}

View File

@@ -0,0 +1,24 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// Attachment is the golang structure for table nl_attachment.
type Attachment struct {
Id uint `json:"id" orm:"id" description:"附件ID"`
Name string `json:"name" orm:"name" description:"文件名"`
Path string `json:"path" orm:"path" description:"文件路径"`
Url string `json:"url" orm:"url" description:"访问URL"`
Size int64 `json:"size" orm:"size" description:"文件大小(字节)"`
MimeType string `json:"mime_type" orm:"mime_type" description:"文件类型"`
Extension string `json:"extension" orm:"extension" description:"文件扩展名"`
UserId int `json:"user_id" orm:"user_id" description:"上传用户ID"`
Status int `json:"status" orm:"status" description:"状态0禁用1启用"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// Banner is the golang structure for table nl_banner.
type Banner struct {
Id uint `json:"id" orm:"id" description:"轮播图ID"`
Title string `json:"title" orm:"title" description:"轮播图标题"`
ImageUrl string `json:"image_url" orm:"image_url" description:"图片URL"`
LinkUrl string `json:"link_url" orm:"link_url" description:"跳转链接"`
Sort int `json:"sort" orm:"sort" description:"排序"`
Status int `json:"status" orm:"status" description:"状态0禁用1启用"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,22 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// Comment is the golang structure for table nl_comment.
type Comment struct {
Id uint `json:"id" orm:"id" description:"评论ID"`
UserId int `json:"user_id" orm:"user_id" description:"用户ID"`
MovieId int `json:"movie_id" orm:"movie_id" description:"影片ID"`
ParentId int `json:"parent_id" orm:"parent_id" description:"父评论ID0为顶级评论"`
Content string `json:"content" orm:"content" description:"评论内容"`
LikeCount int `json:"like_count" orm:"like_count" description:"点赞数"`
Status int `json:"status" orm:"status" description:"状态0待审核1已通过2已拒绝"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,17 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommentLike is the golang structure for table comment_like.
type CommentLike struct {
Id uint `json:"id" orm:"id,primary" description:"点赞ID"`
CommentId uint `json:"comment_id" orm:"comment_id" description:"评论ID"`
UserId uint `json:"user_id" orm:"user_id" description:"用户ID"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
}

View File

@@ -0,0 +1,20 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommentReport is the golang structure for table comment_report.
type CommentReport struct {
Id uint `json:"id" orm:"id,primary" description:"举报ID"`
CommentId uint `json:"comment_id" orm:"comment_id" description:"评论ID"`
UserId uint `json:"user_id" orm:"user_id" description:"举报用户ID"`
Reason string `json:"reason" orm:"reason" description:"举报原因"`
Status int `json:"status" orm:"status" description:"处理状态(0:待处理,1:已处理,2:已忽略)"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// Config is the golang structure for table nl_config.
type Config struct {
Id uint `json:"id" orm:"id" description:"配置ID"`
ConfigKey string `json:"config_key" orm:"config_key" description:"配置键"`
ConfigValue string `json:"config_value" orm:"config_value" description:"配置值"`
ConfigType string `json:"config_type" orm:"config_type" description:"配置类型"`
Description string `json:"description" orm:"description" description:"配置描述"`
Status int `json:"status" orm:"status" description:"状态0禁用1启用"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,23 @@
package entity
// Episode 集数实体
type Episode struct {
Id int `json:"id" orm:"id,primary"` // 集数ID
MovieId int `json:"movie_id" orm:"movie_id"` // 影片ID
EpisodeNum int `json:"episode_num" orm:"episode_num"` // 集数
Title string `json:"title" orm:"title"` // 集数标题
Description string `json:"description" orm:"description"` // 集数简介
Duration int `json:"duration" orm:"duration"` // 时长(秒)
VideoUrl string `json:"video_url" orm:"video_url"` // 视频地址
VideoSize int64 `json:"video_size" orm:"video_size"` // 视频大小(字节)
VideoFormat string `json:"video_format" orm:"video_format"` // 视频格式
Resolution string `json:"resolution" orm:"resolution"` // 分辨率
Thumbnail string `json:"thumbnail" orm:"thumbnail"` // 缩略图
ViewCount int `json:"view_count" orm:"view_count"` // 观看次数
IsVip int `json:"is_vip" orm:"is_vip"` // 是否VIP专享0-否1-是
Sort int `json:"sort" orm:"sort"` // 排序
Status int `json:"status" orm:"status"` // 状态1-正常0-下架
CreatedAt string `json:"created_at" orm:"created_at"` // 创建时间
UpdatedAt string `json:"updated_at" orm:"updated_at"` // 更新时间
DeletedAt string `json:"deleted_at" orm:"deleted_at"` // 删除时间
}

View File

@@ -0,0 +1,35 @@
package entity
// Movie 影片实体
type Movie struct {
Id int `json:"id" orm:"id,primary"` // 影片ID
Title string `json:"title" orm:"title"` // 影片标题
OriginalTitle string `json:"original_title" orm:"original_title"` // 原始标题
Poster string `json:"poster" orm:"poster"` // 海报图片
Banner string `json:"banner" orm:"banner"` // 横幅图片
CategoryId int `json:"category_id" orm:"category_id"` // 分类ID
Type int `json:"type" orm:"type"` // 类型1-电影2-电视剧3-综艺4-动漫5-纪录片
Area string `json:"area" orm:"area"` // 地区
Language string `json:"language" orm:"language"` // 语言
Year int `json:"year" orm:"year"` // 年份
Duration int `json:"duration" orm:"duration"` // 时长(分钟)
Director string `json:"director" orm:"director"` // 导演
Actor string `json:"actor" orm:"actor"` // 演员
Description string `json:"description" orm:"description"` // 简介
Tags string `json:"tags" orm:"tags"` // 标签,逗号分隔
Rating float64 `json:"rating" orm:"rating"` // 评分
RatingCount int `json:"rating_count" orm:"rating_count"` // 评分人数
ViewCount int `json:"view_count" orm:"view_count"` // 观看次数
LikeCount int `json:"like_count" orm:"like_count"` // 点赞数
CollectCount int `json:"collect_count" orm:"collect_count"` // 收藏数
CommentCount int `json:"comment_count" orm:"comment_count"` // 评论数
IsVip int `json:"is_vip" orm:"is_vip"` // 是否VIP专享0-否1-是
IsRecommend int `json:"is_recommend" orm:"is_recommend"` // 是否推荐0-否1-是
IsHot int `json:"is_hot" orm:"is_hot"` // 是否热门0-否1-是
IsNew int `json:"is_new" orm:"is_new"` // 是否最新0-否1-是
Sort int `json:"sort" orm:"sort"` // 排序
Status int `json:"status" orm:"status"` // 状态1-正常0-下架
CreatedAt string `json:"created_at" orm:"created_at"` // 创建时间
UpdatedAt string `json:"updated_at" orm:"updated_at"` // 更新时间
DeletedAt string `json:"deleted_at" orm:"deleted_at"` // 删除时间
}

View File

@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// PaymentOrder is the golang structure for table nl_payment_order.
type PaymentOrder struct {
Id uint `json:"id" orm:"id" description:"订单ID"`
OrderNo string `json:"order_no" orm:"order_no" description:"订单号"`
UserId int `json:"user_id" orm:"user_id" description:"用户ID"`
VipLevelId int `json:"vip_level_id" orm:"vip_level_id" description:"VIP等级ID"`
Amount float64 `json:"amount" orm:"amount" description:"订单金额"`
PaymentMethod string `json:"payment_method" orm:"payment_method" description:"支付方式"`
PaymentStatus int `json:"payment_status" orm:"payment_status" description:"支付状态0待支付1已支付2已取消3已退款"`
PaymentTime *gtime.Time `json:"payment_time" orm:"payment_time" description:"支付时间"`
ExpireTime *gtime.Time `json:"expire_time" orm:"expire_time" description:"过期时间"`
Remark string `json:"remark" orm:"remark" description:"备注"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,24 @@
package entity
// Permission 权限实体
type Permission struct {
Id int `json:"id" orm:"id,primary"` // 权限ID
ParentId int `json:"parent_id" orm:"parent_id"` // 父级权限ID
Name string `json:"name" orm:"name"` // 权限名称
Slug string `json:"slug" orm:"slug"` // 权限标识
Type int `json:"type" orm:"type"` // 权限类型1-菜单2-按钮3-接口
Path string `json:"path" orm:"path"` // 路由路径
Component string `json:"component" orm:"component"` // 组件路径
Icon string `json:"icon" orm:"icon"` // 图标
Method string `json:"method" orm:"method"` // 请求方法
ApiPath string `json:"api_path" orm:"api_path"` // API路径
Description string `json:"description" orm:"description"` // 权限描述
IsHidden int `json:"is_hidden" orm:"is_hidden"` // 是否隐藏0-否1-是
IsCache int `json:"is_cache" orm:"is_cache"` // 是否缓存0-否1-是
IsSystem int `json:"is_system" orm:"is_system"` // 是否系统权限0-否1-是
Sort int `json:"sort" orm:"sort"` // 排序
Status int `json:"status" orm:"status"` // 状态1-启用0-禁用
CreatedAt string `json:"created_at" orm:"created_at"` // 创建时间
UpdatedAt string `json:"updated_at" orm:"updated_at"` // 更新时间
DeletedAt string `json:"deleted_at" orm:"deleted_at"` // 删除时间
}

View File

@@ -0,0 +1,16 @@
package entity
// Role 角色实体
type Role struct {
Id int `json:"id" orm:"id,primary"` // 角色ID
Name string `json:"name" orm:"name"` // 角色名称
Slug string `json:"slug" orm:"slug"` // 角色标识
Description string `json:"description" orm:"description"` // 角色描述
Level int `json:"level" orm:"level"` // 角色等级
IsSystem int `json:"is_system" orm:"is_system"` // 是否系统角色0-否1-是
Sort int `json:"sort" orm:"sort"` // 排序
Status int `json:"status" orm:"status"` // 状态1-启用0-禁用
CreatedAt string `json:"created_at" orm:"created_at"` // 创建时间
UpdatedAt string `json:"updated_at" orm:"updated_at"` // 更新时间
DeletedAt string `json:"deleted_at" orm:"deleted_at"` // 删除时间
}

View File

@@ -0,0 +1,32 @@
package entity
import (
"time"
)
// NlUser 用户表
type NlUser struct {
Id uint `json:"id" orm:"id,primary"` // 用户ID
OpenId string `json:"open_id" orm:"open_id"` // OpenID用于第三方登录
Username string `json:"username" orm:"username"` // 用户名
Avatar string `json:"avatar" orm:"avatar"` // 头像
NickName string `json:"nick_name" orm:"nick_name"` // 昵称
Password string `json:"-" orm:"password"` // 密码
Phone string `json:"phone" orm:"phone"` // 手机号
Email string `json:"email" orm:"email"` // 邮箱
Gender int `json:"gender" orm:"gender"` // 性别 0未知 1男 2女
Birthday *time.Time `json:"birthday" orm:"birthday"` // 生日
VipLevel int `json:"vip_level" orm:"vip_level"` // VIP等级 0普通用户 1VIP1 2VIP2
VipExpireTime int `json:"vip_expire_time" orm:"vip_expire_time"` // VIP到期时间
Balance float64 `json:"balance" orm:"balance"` // 余额
Points int `json:"points" orm:"points"` // 积分
RegIp int64 `json:"reg_ip" orm:"reg_ip"` // 注册IP
LastLoginTime int `json:"last_login_time" orm:"last_login_time"` // 最后登录时间
LastLoginIp int64 `json:"last_login_ip" orm:"last_login_ip"` // 最后登录IP
LoginCount int `json:"login_count" orm:"login_count"` // 登录次数
Desc string `json:"desc" orm:"desc"` // 备注
Status int `json:"status" orm:"status"` // 状态 1正常 0禁用
CreatedAt int `json:"created_at" orm:"created_at"` // 创建时间
UpdatedAt int `json:"updated_at" orm:"updated_at"` // 更新时间
DeletedAt int `json:"deleted_at" orm:"deleted_at"` // 删除时间
}

View File

@@ -0,0 +1,19 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// UserCollect is the golang structure for table nl_user_collect.
type UserCollect struct {
Id uint `json:"id" orm:"id" description:"收藏ID"`
UserId int `json:"user_id" orm:"user_id" description:"用户ID"`
MovieId int `json:"movie_id" orm:"movie_id" description:"影片ID"`
Type int `json:"type" orm:"type" description:"收藏类型 1影片 2演员 3导演"`
TargetId int `json:"target_id" orm:"target_id" description:"目标ID"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// UserLog is the golang structure for table nl_user_log.
type UserLog struct {
Id uint `json:"id" orm:"id" description:"日志ID"`
UserId int `json:"user_id" orm:"user_id" description:"用户ID"`
Action string `json:"action" orm:"action" description:"操作动作"`
Module string `json:"module" orm:"module" description:"操作模块"`
Content string `json:"content" orm:"content" description:"操作内容"`
Ip string `json:"ip" orm:"ip" description:"IP地址"`
UserAgent string `json:"user_agent" orm:"user_agent" description:"用户代理"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// UserWatchHistory is the golang structure for table nl_user_watch_history.
type UserWatchHistory struct {
Id uint `json:"id" orm:"id" description:"观看记录ID"`
UserId int `json:"user_id" orm:"user_id" description:"用户ID"`
MovieId int `json:"movie_id" orm:"movie_id" description:"影片ID"`
EpisodeId int `json:"episode_id" orm:"episode_id" description:"集数ID"`
WatchTime int `json:"watch_time" orm:"watch_time" description:"观看时长(秒)"`
TotalTime int `json:"total_time" orm:"total_time" description:"总时长(秒)"`
Progress float64 `json:"progress" orm:"progress" description:"观看进度百分比"`
LastWatchTime int `json:"last_watch_time" orm:"last_watch_time" description:"最后观看时间"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,24 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// VipLevel is the golang structure for table nl_vip_level.
type VipLevel struct {
Id uint `json:"id" orm:"id" description:"VIP等级ID"`
Name string `json:"name" orm:"name" description:"VIP等级名称"`
Level int `json:"level" orm:"level" description:"等级数值"`
Price float64 `json:"price" orm:"price" description:"价格"`
Duration int `json:"duration" orm:"duration" description:"有效期(天)"`
Description string `json:"description" orm:"description" description:"等级描述"`
Privileges string `json:"privileges" orm:"privileges" description:"特权说明(JSON格式)"`
Status int `json:"status" orm:"status" description:"状态0禁用1启用"`
Sort int `json:"sort" orm:"sort" description:"排序"`
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"`
}