module.exports = function (sequelize, DataTypes) {
    return sequelize.define('teams', {
        id: {
            type: DataTypes.INTEGER,
            allowNull: false,
            primaryKey: true,
            comment: "球队ID"
        },
        coach_id: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "教练ID"
        },
        competition_id: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "赛事ID(球队所属联赛,杯赛不关联)"
        },
        country_id: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "国家ID"
        },
        country_logo: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "国家队Logo(为国家队时存在)"
        },
        foreign_players: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "非本土球员数,-1表示没有该字段数据"
        },
        foundation_time: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "成立时间"
        },
        logo: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "球队Logo"
        },
        market_value: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "市值"
        },
        market_value_currency: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "市值单位"
        },
        name_en: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "英文名称"
        },
        name_zh: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "中文名称"
        },
        name_zht: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "粤语名称"
        },
        national: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "是否国家队,1-是、0-否"
        },
        national_players: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "国家队球员数,-1表示没有该字段数据"
        },
        short_name_en: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "英文简称"
        },
        short_name_zh: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "中文简称"
        },
        short_name_zht: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "粤语简称"
        },
        total_players: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "总球员数,-1表示没有该字段数据"
        },
        venue_id: {
            type: DataTypes.INTEGER,
            allowNull: true,
            comment: "场馆ID"
        },
        website: {
            type: DataTypes.STRING(255),
            allowNull: true,
            comment: "球队官网"
        },
        updated_at: {
            type: DataTypes.BIGINT,
            allowNull: true,
            get() {
                return moment(this.getDataValue('updated_at')).format('YYYY-MM-DD HH:mm:ss');
            }
        },
        created_at: {
            type: DataTypes.DATE,
            allowNull: true
        }
    });
};
//# sourceMappingURL=teams.js.map