{
  // 名称
  "name": "${name}",
  // 标题
  "title": "${title || '用户账户模型'}",
  // 描述
  "description": "${description || '定于用户账户模型的组件'}",
  // 主文件
  "main": "${main || ''}",
  // 状态 0：禁用 1：启用
  "state": 1,
  // 排序，越小越靠前
  "sort": 100,
  // 模型包含字段
  "fields": {
    "user_id": {
      // 值类型
      "type": "number",
      // 数据类型
      "data_type": "int",
      // 标题
      "title": "用户ID",
      // 描述
      "description": "用户的唯一标识符",
      // 最小值
      "min": 1,
      // 最大值
      "max": 10000000,
      // 默认值
      "default": 0,
      // 是否主键
      "primary_key": true,
      // 是否自动增长
      "auto": true
    },
    "username": {
      "type": "string",
      "data_type": "varchar",
      "title": "用户名",
      "description": "用户的显示名称",
      // 最小长度
      "min": 1,
      // 最大长度
      "max": 24,
      "default": ""
    },
    "password": {
      "type": "string",
      "data_type": "varchar",
      "title": "密码",
      "description": "用户的密码",
      "min": 1,
      "max": 32,
      "default": "123456"
    },
    "salt": {
      "type": "string",
      "data_type": "varchar",
      "title": "盐值",
      "description": "用户密码的盐值",
      "min": 1,
      "max": 32,
      "default": "mm2025"
    },
    "state": {
      "type": "number",
      "data_type": "int",
      "title": "状态",
      "description": "账户的状态",
      "min": 1,
      "max": 10000000,
      "default": 1,
      "enum": [
        {
          "value": 1,
          "label": "可用"
        },
        {
          "value": 2,
          "label": "异常"
        },
        {
          "value": 3,
          "label": "已冻结"
        },
        {
          "value": 4,
          "label": "已注销"
        }
      ]
    },
    "avatar": {
      "type": "string",
      "data_type": "varchar",
      "title": "头像",
      "description": "用户的头像",
      "min": 1,
      "max": 255,
      "default": "/avatar.jpg"
    },
    "nickname": {
      "type": "string",
      "data_type": "varchar",
      "title": "昵称",
      "description": "用户的昵称",
      "min": 1,
      "max": 24,
      "default": ""
    },
    "vip": {
      "type": "number",
      "data_type": "int",
      "title": "会员等级",
      "description": "用户的会员等级",
      "min": 0,
      "max": 10000000,
      "default": 0
    },
    "gm": {
      "type": "number",
      "data_type": "int",
      "title": "管理员等级",
      "description": "用户的管理员等级",
      "min": 0,
      "max": 10000000,
      "default": 0
    },
    "mc": {
      "type": "number",
      "data_type": "int",
      "title": "商家等级",
      "description": "用户的商家等级",
      "min": 0,
      "max": 10000000,
      "default": 0
    },
    "email": {
      "type": "string",
      "data_type": "varchar",
      "title": "邮箱",
      "description": "用户的邮箱",
      "min": 1,
      "max": 255,
      "default": ""
    },
    "phone": {
      "type": "string",
      "data_type": "varchar",
      "title": "手机号",
      "description": "用户的手机号",
      "min": 1,
      "max": 11,
      "default": ""
    },
    "admin_group": {
      "type": "string",
      "data_type": "varchar",
      "title": "管理员组",
      "description": "用户所属的管理员组集合",
      "min": 0,
      "max": 255,
      "default": ""
    },
    "user_group": {
      "type": "string",
      "data_type": "varchar",
      "title": "用户组",
      "description": "用户所属的用户组集合",
      "min": 0,
      "max": 255,
      "default": "default"
    },
    "referee_id": {
      "type": "number",
      "data_type": "int",
      "title": "推荐人ID",
      "description": "用户的推荐人ID",
      "min": 1,
      "max": 10000000,
      "default": 0
    },
    "login_ip": {
      "type": "string",
      "data_type": "varchar",
      "title": "登录IP",
      "description": "用户最近一次登录的IP地址",
      "min": 0,
      "max": 255,
      "default": "127.0.0.1"
    },
    "login_time": {
      "type": "string",
      "data_type": "datetime",
      "title": "登录时间",
      "description": "用户最近一次登录的时间",
      "min": 1,
      "max": 20,
      "default": "1970-01-01 00:00:00"
    },
    "time_create": {
      "type": "string",
      "data_type": "datetime",
      "title": "创建时间",
      "description": "用户账户的创建时间",
      "min": 1,
      "max": 20,
      "default": "now()"
    },
    "time_update": {
      "type": "string",
      "data_type": "datetime",
      "title": "更新时间",
      "description": "用户账户的更新时间",
      "min": 1,
      "max": 20,
      "default": "1970-01-01 00:00:00"
    }
  }
}
