二维码生成及展示
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.6 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const PublicityInfo = sequelize.define("publicityInfo", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "宣传标题",
primaryKey: false,
field: "name",
autoIncrement: false,
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "类型(图片|文件|链接|视频)",
primaryKey: false,
field: "type",
autoIncrement: false,
},
time: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: "创建/更新时间",
primaryKey: false,
field: "time",
autoIncrement: false,
},
qrcodeId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "关联二维码ID",
primaryKey: false,
field: "qrcode_id",
autoIncrement: false,
references: {
model: "qrcode",
key: "id"
}
},
link: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "type为链接时的链接地址",
primaryKey: false,
field: "link",
autoIncrement: false,
},
}, {
tableName: "publicity_info",
comment: "",
indexes: []
});
dc.models.PublicityInfo = PublicityInfo;
return PublicityInfo;
};