# -*- encoding: utf-8 -*-
# -----------------------------------------------------------------------------
# @File Name  : fund_report_record.py
# @Time       : 2020/12/3 下午4:42
# @Author     : X. Peng
# @Email      : acepengxiong@163.com
# @Software   : PyCharm
# -----------------------------------------------------------------------------

from sqlalchemy import Column, BigInteger, Integer, String, DateTime, Float, text
from sqlalchemy.sql import func
from app.model.base import Base
from app.model.base import BaseModel


class FundReportRecord(Base, BaseModel):
    """基金月报记录表"""
    __tablename__ = 'fund_report_record'

    id = Column(String(64), primary_key=True)
    receipt_no = Column(String(64), comment='回执编号')
    ifa_id = Column(String(64), server_default='', comment='理财师ID')
    customer_id = Column(String(64), server_default='', comment='客户ID')
    pdf_url = Column(String(64), server_default='', comment='pdf路径')
    is_read = Column(Integer, server_default=text("0"), comment='是否已查看：0未查看，1已经查看')
    create_by = Column(String(64), server_default='', comment='创建人ID')
    create_time = Column(DateTime(timezone=True), server_default=func.now(), comment='生成时间')
    update_by = Column(String(64), server_default='', comment='更新人ID')
    update_time = Column(DateTime(timezone=True), server_default=func.now(), comment='更新时间')
