426 lines
		
	
	
		
			9.3 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			426 lines
		
	
	
		
			9.3 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Code generated by sqlc. DO NOT EDIT.
 | |
| // versions:
 | |
| //   sqlc v1.28.0
 | |
| 
 | |
| package db
 | |
| 
 | |
| import (
 | |
| 	"time"
 | |
| 
 | |
| 	"github.com/google/uuid"
 | |
| 	"github.com/jackc/pgx/v5/pgtype"
 | |
| )
 | |
| 
 | |
| type Budget struct {
 | |
| 	// ID
 | |
| 	ID int64 `json:"id"`
 | |
| 	// 项目ID
 | |
| 	ProjectID int64 `json:"project_id"`
 | |
| 	// 名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 预算类型: 收入/支出
 | |
| 	BudgetType int32 `json:"budget_type"`
 | |
| 	// 类别
 | |
| 	Category int32 `json:"category"`
 | |
| 	// 开始时间
 | |
| 	StartAt time.Time `json:"start_at"`
 | |
| 	// 结束时间
 | |
| 	EndAt time.Time `json:"end_at"`
 | |
| 	// 预算金额
 | |
| 	Amount pgtype.Numeric `json:"amount"`
 | |
| 	// 已使用金额
 | |
| 	UsedAmount pgtype.Numeric `json:"used_amount"`
 | |
| 	// 剩余金额
 | |
| 	RemainingAmount pgtype.Numeric `json:"remaining_amount"`
 | |
| 	// 备注
 | |
| 	Remark string `json:"remark"`
 | |
| 	// 状态
 | |
| 	Status int16 `json:"status"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 创建人
 | |
| 	CreatedUserID int32 `json:"created_user_id"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| 	// 更新人
 | |
| 	UpdatedUserID int32 `json:"updated_user_id"`
 | |
| }
 | |
| 
 | |
| type Category struct {
 | |
| 	// ID
 | |
| 	ID int32 `json:"id"`
 | |
| 	// 名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 图标
 | |
| 	Icon string `json:"icon"`
 | |
| 	// 描述
 | |
| 	Description string `json:"description"`
 | |
| 	// 拼音
 | |
| 	Letter string `json:"letter"`
 | |
| 	// 父级ID
 | |
| 	ParentID int32 `json:"parent_id"`
 | |
| 	// 树路径
 | |
| 	ParentPath string `json:"parent_path"`
 | |
| 	// 状态
 | |
| 	Status int16 `json:"status"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| }
 | |
| 
 | |
| type Customer struct {
 | |
| 	// ID
 | |
| 	ID int64 `json:"id"`
 | |
| 	// 名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 类别
 | |
| 	Category int32 `json:"category"`
 | |
| 	// 来源
 | |
| 	Source int32 `json:"source"`
 | |
| 	// 地址
 | |
| 	Address string `json:"address"`
 | |
| 	// 主要联系人
 | |
| 	ContactName string `json:"contact_name"`
 | |
| 	// 主要联系人手机
 | |
| 	ContactPhone string `json:"contact_phone"`
 | |
| 	// 状态
 | |
| 	Status int16 `json:"status"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 创建人
 | |
| 	CreatedBy int32 `json:"created_by"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| 	// 更新人
 | |
| 	UpdatedBy int32 `json:"updated_by"`
 | |
| }
 | |
| 
 | |
| type CustomerContact struct {
 | |
| 	// ID
 | |
| 	ID int32 `json:"id"`
 | |
| 	// 名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 联系方式
 | |
| 	Telephone string `json:"telephone"`
 | |
| 	// 客户ID
 | |
| 	CustomerID int64 `json:"customer_id"`
 | |
| 	// 状态
 | |
| 	Status int16 `json:"status"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 创建人
 | |
| 	CreatedBy int32 `json:"created_by"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| 	// 更新人
 | |
| 	UpdatedBy int32 `json:"updated_by"`
 | |
| }
 | |
| 
 | |
| type Expense struct {
 | |
| 	// ID
 | |
| 	ID int64 `json:"id"`
 | |
| 	// 项目ID
 | |
| 	ProjectID int64 `json:"project_id"`
 | |
| 	// 预算ID
 | |
| 	BudgetID int64 `json:"budget_id"`
 | |
| 	// 支出金额
 | |
| 	Amount pgtype.Numeric `json:"amount"`
 | |
| 	// 支出时间
 | |
| 	ExpensesAt time.Time `json:"expenses_at"`
 | |
| 	// 支出类型
 | |
| 	ExpensesType int32 `json:"expenses_type"`
 | |
| 	// 备注
 | |
| 	Remark string `json:"remark"`
 | |
| 	// 状态
 | |
| 	Status int16 `json:"status"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 创建人
 | |
| 	CreatedUserID int32 `json:"created_user_id"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| 	// 更新人
 | |
| 	UpdatedUserID int32 `json:"updated_user_id"`
 | |
| }
 | |
| 
 | |
| type Income struct {
 | |
| 	// ID
 | |
| 	ID int64 `json:"id"`
 | |
| 	// 项目ID
 | |
| 	ProjectID int64 `json:"project_id"`
 | |
| 	// 预算ID
 | |
| 	BudgetID int64 `json:"budget_id"`
 | |
| 	// 收入金额
 | |
| 	Amount pgtype.Numeric `json:"amount"`
 | |
| 	// 收入时间
 | |
| 	IncomeAt time.Time `json:"income_at"`
 | |
| 	// 收入类型
 | |
| 	IncomeType int32 `json:"income_type"`
 | |
| 	// 收入银行
 | |
| 	IncomeBank int32 `json:"income_bank"`
 | |
| 	// 备注
 | |
| 	Remark string `json:"remark"`
 | |
| 	// 状态
 | |
| 	Status int16 `json:"status"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 创建人
 | |
| 	CreatedUserID int32 `json:"created_user_id"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| 	// 更新人
 | |
| 	UpdatedUserID int32 `json:"updated_user_id"`
 | |
| }
 | |
| 
 | |
| type Project struct {
 | |
| 	// ID
 | |
| 	ID int64 `json:"id"`
 | |
| 	// 名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 开始时间
 | |
| 	StartAt time.Time `json:"start_at"`
 | |
| 	// 结束时间
 | |
| 	EndAt time.Time `json:"end_at"`
 | |
| 	// 客户ID
 | |
| 	CustomerID int64 `json:"customer_id"`
 | |
| 	// 总金额
 | |
| 	TotalMoney pgtype.Numeric `json:"total_money"`
 | |
| 	// 简介
 | |
| 	Description string `json:"description"`
 | |
| 	// 申请时间
 | |
| 	ApplyAt time.Time `json:"apply_at"`
 | |
| 	// 申请人
 | |
| 	ApplyUserID int32 `json:"apply_user_id"`
 | |
| 	// 项目经理
 | |
| 	ManagerID int32 `json:"manager_id"`
 | |
| 	// 项目成员
 | |
| 	Members string `json:"members"`
 | |
| 	// 状态
 | |
| 	Status int16 `json:"status"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 创建人
 | |
| 	CreatedUserID int32 `json:"created_user_id"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| 	// 更新人
 | |
| 	UpdatedUserID int32 `json:"updated_user_id"`
 | |
| }
 | |
| 
 | |
| type ProjectFile struct {
 | |
| 	// ID
 | |
| 	ID int64 `json:"id"`
 | |
| 	// 名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 路径
 | |
| 	Path string `json:"path"`
 | |
| 	// 项目ID
 | |
| 	ProjectID int64 `json:"project_id"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 创建人
 | |
| 	CreatedUserID int32 `json:"created_user_id"`
 | |
| }
 | |
| 
 | |
| type Session struct {
 | |
| 	// token
 | |
| 	Token string `json:"token"`
 | |
| 	// data
 | |
| 	Data []byte `json:"data"`
 | |
| 	// expiry
 | |
| 	Expiry time.Time `json:"expiry"`
 | |
| }
 | |
| 
 | |
| type SysAuditLog struct {
 | |
| 	ID int64 `json:"id"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 邮箱地址
 | |
| 	Email string `json:"email"`
 | |
| 	// 用户名称
 | |
| 	Username string `json:"username"`
 | |
| 	// 用户uuid
 | |
| 	UserUuid uuid.UUID `json:"user_uuid"`
 | |
| 	// 请求开始时间
 | |
| 	StartAt time.Time `json:"start_at"`
 | |
| 	// 请求结束时间
 | |
| 	EndAt time.Time `json:"end_at"`
 | |
| 	// 请求总时间
 | |
| 	Duration string `json:"duration"`
 | |
| 	// 请求链接
 | |
| 	Url string `json:"url"`
 | |
| 	// 请求类型
 | |
| 	Method string `json:"method"`
 | |
| 	// 请求参数
 | |
| 	Parameters string `json:"parameters"`
 | |
| 	// 上一个链接
 | |
| 	RefererUrl string `json:"referer_url"`
 | |
| 	// 系统
 | |
| 	Os string `json:"os"`
 | |
| 	// ip
 | |
| 	Ip string `json:"ip"`
 | |
| 	// 浏览器
 | |
| 	Browser string `json:"browser"`
 | |
| 	// 备注
 | |
| 	Remark string `json:"remark"`
 | |
| }
 | |
| 
 | |
| type SysConfig struct {
 | |
| 	ID int32 `json:"id"`
 | |
| 	// 存储键
 | |
| 	Key string `json:"key"`
 | |
| 	// 存储值
 | |
| 	Value []byte `json:"value"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| }
 | |
| 
 | |
| type SysDepartment struct {
 | |
| 	ID int32 `json:"id"`
 | |
| 	// 部门名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 上级id
 | |
| 	ParentID int32 `json:"parent_id"`
 | |
| 	// 树路径
 | |
| 	ParentPath string `json:"parent_path"`
 | |
| 	// 状态
 | |
| 	Status int32 `json:"status"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| }
 | |
| 
 | |
| type SysMenu struct {
 | |
| 	ID int32 `json:"id"`
 | |
| 	// 名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 显示名称
 | |
| 	DisplayName string `json:"display_name"`
 | |
| 	// 菜单url
 | |
| 	Url string `json:"url"`
 | |
| 	// 菜单类型(node, menu, btn)
 | |
| 	Type string `json:"type"`
 | |
| 	// 上级id
 | |
| 	ParentID int32 `json:"parent_id"`
 | |
| 	// 树路径
 | |
| 	ParentPath string `json:"parent_path"`
 | |
| 	// 菜单图标
 | |
| 	Avatar string `json:"avatar"`
 | |
| 	// 菜单样式
 | |
| 	Style string `json:"style"`
 | |
| 	// 是否可见
 | |
| 	Visible bool `json:"visible"`
 | |
| 	// 是否列表
 | |
| 	IsList bool `json:"is_list"`
 | |
| 	// 状态
 | |
| 	Status int32 `json:"status"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| }
 | |
| 
 | |
| type SysRole struct {
 | |
| 	ID int32 `json:"id"`
 | |
| 	// 名称
 | |
| 	Name string `json:"name"`
 | |
| 	// 显示名称
 | |
| 	DisplayName string `json:"display_name"`
 | |
| 	// 上级id
 | |
| 	ParentID int32 `json:"parent_id"`
 | |
| 	// 树路径
 | |
| 	ParentPath string `json:"parent_path"`
 | |
| 	// 是否vip
 | |
| 	Vip bool `json:"vip"`
 | |
| 	// 状态
 | |
| 	Status int32 `json:"status"`
 | |
| 	// 排序
 | |
| 	Sort int32 `json:"sort"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| }
 | |
| 
 | |
| type SysRoleMenu struct {
 | |
| 	// 角色id
 | |
| 	RoleID int32 `json:"role_id"`
 | |
| 	// 菜单id
 | |
| 	MenuID int32 `json:"menu_id"`
 | |
| }
 | |
| 
 | |
| type SysUser struct {
 | |
| 	ID   int32     `json:"id"`
 | |
| 	Uuid uuid.UUID `json:"uuid"`
 | |
| 	// 邮箱地址
 | |
| 	Email string `json:"email"`
 | |
| 	// 用户名称
 | |
| 	Username string `json:"username"`
 | |
| 	// 加密密码
 | |
| 	HashedPassword []byte `json:"hashed_password"`
 | |
| 	// 密码盐值
 | |
| 	Salt string `json:"salt"`
 | |
| 	// 头像
 | |
| 	Avatar string `json:"avatar"`
 | |
| 	// 性别
 | |
| 	Gender int32 `json:"gender"`
 | |
| 	// 部门
 | |
| 	DepartmentID int32 `json:"department_id"`
 | |
| 	// 角色
 | |
| 	RoleID int32 `json:"role_id"`
 | |
| 	// 状态
 | |
| 	Status int32 `json:"status"`
 | |
| 	// 密码修改时间
 | |
| 	ChangePasswordAt time.Time `json:"change_password_at"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 更新时间
 | |
| 	UpdatedAt time.Time `json:"updated_at"`
 | |
| }
 | |
| 
 | |
| type SysUserLoginLog struct {
 | |
| 	ID int64 `json:"id"`
 | |
| 	// 创建时间
 | |
| 	CreatedAt time.Time `json:"created_at"`
 | |
| 	// 邮箱地址
 | |
| 	Email string `json:"email"`
 | |
| 	// 用户名称
 | |
| 	Username string `json:"username"`
 | |
| 	// 用户uuid
 | |
| 	UserUuid uuid.UUID `json:"user_uuid"`
 | |
| 	// 是否登陆成功
 | |
| 	IsSuccess bool `json:"is_success"`
 | |
| 	// 登陆消息
 | |
| 	Message string `json:"message"`
 | |
| 	// 上一个链接
 | |
| 	RefererUrl string `json:"referer_url"`
 | |
| 	// 链接
 | |
| 	Url string `json:"url"`
 | |
| 	// 系统
 | |
| 	Os string `json:"os"`
 | |
| 	// ip
 | |
| 	Ip string `json:"ip"`
 | |
| 	// 浏览器
 | |
| 	Browser string `json:"browser"`
 | |
| }
 |