
ALTER TABLE modelinfo ADD sort int DEFAULT 0 NULL;

create table sharerecord
(
  id    int auto_increment   primary key,
  phone varchar(255) null,
  code  varchar(255) null
)
  comment '分享记录';

ALTER TABLE cashrecord ALTER COLUMN AccountingDate SET DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE cashrecord ALTER COLUMN FeeDate SET DEFAULT CURRENT_TIMESTAMP;

CREATE TABLE coin_share_record
(
    id             int AUTO_INCREMENT
        PRIMARY KEY,
    member_pk      int                                NULL,
    from_member_pk int                                NULL,
    total_amount   decimal(18, 4)                     NULL,
    share_amount   decimal(18, 4)                     NULL,
    ratio          decimal(18, 4)                     NULL,
    type           varchar(255)                       NULL,
    remark         varchar(255)                       NULL,
    create_time    datetime DEFAULT CURRENT_TIMESTAMP NULL
);

ALTER TABLE memberinfo ADD income_ratio_gift decimal(18,4) DEFAULT 100 NULL;
ALTER TABLE memberinfo ADD income_ratio_video decimal(18,4) DEFAULT 50 NULL;
ALTER TABLE memberinfo ADD income_ratio_service decimal(18,4) DEFAULT 70 NULL;
ALTER TABLE memberinfo ADD share_ratio_gift decimal(18,4) DEFAULT 0 NULL;
ALTER TABLE memberinfo ADD share_ratio_video decimal(18,4) DEFAULT 10 NULL;
ALTER TABLE memberinfo ADD share_ratio_service decimal(18,4) DEFAULT 10 NULL;
ALTER TABLE memberinfo ADD broker_ratio_git decimal(18,4) DEFAULT 0 NULL;
ALTER TABLE memberinfo ADD broker_ratio_video decimal(18,4) DEFAULT 10 NULL;
ALTER TABLE memberinfo ADD broker_ratio_service decimal(18,4) DEFAULT 10 NULL;
ALTER TABLE memberinfo ADD coin_share decimal(18,4) DEFAULT 0.0000 NULL;

ALTER TABLE modelinfo ADD hobby varchar(255) NULL;
ALTER TABLE modelinfo
  MODIFY COLUMN hobby varchar(255) AFTER job;

ALTER TABLE modelinfo ADD college varchar(255) NULL;
ALTER TABLE modelinfo
  MODIFY COLUMN college varchar(255) AFTER hobby;

ALTER TABLE modelinfo ADD constellation varchar(255) NULL;
ALTER TABLE modelinfo
  MODIFY COLUMN constellation varchar(255) AFTER college;

ALTER TABLE modelinfo ALTER COLUMN VPrice SET DEFAULT 6.0;
ALTER TABLE memberinfo ADD can_chat int DEFAULT 0 NULL;

ALTER TABLE memberinfo ALTER COLUMN coin_A SET DEFAULT 0;