Invoice.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%INVOICE}}".
  6. *
  7. * @property string $ID
  8. * @property string $USER_ID 会员ID
  9. * @property string $REAL_NAME 会员姓名
  10. * @property string $DEC_LV 报单级别
  11. * @property string $EMP_LV 聘级
  12. * @property string $MOBILE 手机号
  13. * @property string $REG_TYPE 注册类型
  14. * @property string $REG_NAME 注册名称
  15. * @property string $CREDIT_CODE 统一代码
  16. * @property string $SALE_NAME 销售方名称
  17. * @property string $TAXPAYER_NUMBER 纳税人识别代码
  18. * @property string $INVOICE_NUMBER 发票号
  19. * @property string $INVOICE_ACCOUNT 交易账户-发票账户
  20. * @property string $TAX_ACCOUNT 交易账户-税款账户
  21. * @property string $AMOUNT 交易金额
  22. * @property int $OUTED_AT 开票日期
  23. * @property int $DEDUCT_PERIOD_NUM 发票冲减期数
  24. * @property string $REMARK 备注
  25. * @property int $IS_DEL 添加时间
  26. * @property int $CREATED_AT 是否删除
  27. * @property int $DELETED_AT 删除时间
  28. */
  29. class Invoice extends \common\components\ActiveRecord
  30. {
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public static function tableName()
  35. {
  36. return '{{%INVOICE}}';
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function rules()
  42. {
  43. return [
  44. [['USER_ID', 'CREATED_AT'], 'required'],
  45. [['AMOUNT'], 'number'],
  46. [['OUTED_AT', 'DEDUCT_PERIOD_NUM', 'IS_DEL', 'CREATED_AT', 'DELETED_AT'], 'integer'],
  47. [['ID', 'USER_ID', 'DEC_LV', 'EMP_LV', 'MOBILE', 'REG_TYPE'], 'string', 'max' => 32],
  48. [['REAL_NAME', 'TAXPAYER_NUMBER', 'INVOICE_NUMBER', 'INVOICE_ACCOUNT', 'TAX_ACCOUNT'], 'string', 'max' => 128],
  49. [['REG_NAME', 'CREDIT_CODE', 'SALE_NAME', 'REMARK'], 'string', 'max' => 4000],
  50. [['ID'], 'unique'],
  51. ];
  52. }
  53. /**
  54. * {@inheritdoc}
  55. */
  56. public function attributeLabels()
  57. {
  58. return [
  59. 'ID' => 'ID',
  60. 'USER_ID' => '会员ID',
  61. 'REAL_NAME' => '会员姓名',
  62. 'DEC_LV' => '报单级别',
  63. 'EMP_LV' => '聘级',
  64. 'MOBILE' => '手机号',
  65. 'REG_TYPE' => '注册类型',
  66. 'REG_NAME' => '注册名称',
  67. 'CREDIT_CODE' => '统一代码',
  68. 'SALE_NAME' => '销售方名称',
  69. 'TAXPAYER_NUMBER' => '纳税人识别代码',
  70. 'INVOICE_NUMBER' => '发票号',
  71. 'INVOICE_ACCOUNT' => '交易账户-发票账户',
  72. 'TAX_ACCOUNT' => '交易账户-税款账户',
  73. 'AMOUNT' => '交易金额',
  74. 'OUTED_AT' => '开票日期',
  75. 'DEDUCT_PERIOD_NUM' => '发票冲减期数',
  76. 'REMARK' => '备注',
  77. 'IS_DEL' => '添加时间',
  78. 'CREATED_AT' => '是否删除',
  79. 'DELETED_AT' => '删除时间',
  80. ];
  81. }
  82. }