package com.reyun.saas.mob.user.domain;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table(name = "channel")
public class Channel {

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;


    /**
     * appkey
     */
    private String appkey;

    /**
     * app名称
     */
    @Transient
    private String appName;

    /**
     * 渠道别名
     */
    @Column(name = "channel_alias")
    private String channelAlias;

    /**
     * 渠道id
     */
    private String cid;

    /**
     * bundle_id(iOS)或 package_name(Android)
     */
    @Transient
    private String bid;

    /**
     * 从实时同步到web库的时间
     */
    @Column(name = "sync_time")
    private Date syncTime;

    /**
     * 修改人
     */
    @Column(name = "modify_user")
    private Long modifyUser;

    /**
     * 修改时间
     */
    @Column(name = "modify_time")
    private Date modifyTime;

    /**
     * 启用状态 0-未启用  1-启用
     */
    private Boolean active;

    /**
     * 是否自定义过别名 0-未自定义别名  1-自定义过别名
     */
    @Column(name = "is_custom_alias")
    private Boolean isCustomAlias;

    /**
     * 删除标志
     */
    @Column(name = "del_flag")
    private Boolean delFlag;
}
