import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * 自定义页面
 */
@Entity('fixtures_mould')
export class FixturesMouldEntity extends BaseEntity {

    @Column({ comment: '页面名称' })
    name: string;

    @Column({ comment: '页面背景色', default: '#f6f7f8' })
    background: string;

    @Column({ comment: '页面背景图', default: '', nullable: true })
    backgroundImage: string;

    @Index()
    @Column({ comment: '是否首页 0-否 1-是', type: 'tinyint', default: 0 })
    isHome: number;

    @Column({ comment: '状态 0-关闭 1-正常', type: 'tinyint', default: 1 })
    status: number;

    @Column({ comment: '状态栏占位 0-隐藏 1-显示', type: 'tinyint', default: 1 })
    statusBar: number;

    @Column({ comment: '状态栏占位颜色', type: 'varchar', default: '#fff' })
    statusBarColor: string;

    @Column({ comment: '组件数据', type: 'json', nullable: true })
    data: string;

    @Column({ comment: '组件数据-未发布', type: 'json', nullable: true })
    form: string;
}
