module.exports = {
    // 学生管理
    mode: 'simple',
    modelCn: '',
    // 插入学生时自动插入一条用户记录
    createInsertUser: {
        userMap: {
            userName: "studentname",
            loginName: "phone",
            realname: "studentname",
            sex: 0,
            strRoleId: 5,
            email: "",
            organId: null,
            isEmployee: 1,
            status: 1,
            isSuper: 0,
        },
    },
    fields: {
        studentnum: {
            type: 'string',
            comment: '学号',
            meta: {
                formType: 'input',
            },
        },
        studentname: {
            type: 'string',
            comment: '姓名',
            meta: {
                formType: 'input',
            },
        },
        class_id: {
            type: 'integer',
            comment: '班级',
            meta: {
                formType: 'select',
            },
        },
        sex: {
            type: 'integer',
            comment: '性别',
            meta: {
                formType: 'select',
                chineseMap: {
                    1: '男',
                    2: '女'
                },
                defaultValue: 1
            },
        },
        place: {
            type: 'string',
            comment: '籍贯',
            meta: {
                formType: 'input',
            },
        },
        phone: {
            type: 'string',
            comment: '手机号码',
            meta: {
                formType: 'input',
            },
        },
    },
    foreign: {},
    extendActions: {},
    primaryKey: 'id',
    middlewares: ['loginRequired'], // 该模型需要登录，权限认证
}