import { RhSelectItemT, RhSelectableDto } from './select-model'; import { WeekDay } from '@angular/common'; import { WithNil } from './base'; export type RhCodeRuleCategoryType = 'string' | 'guid' | 'time' | 'timestamp' | 'dynamic' | 'random' | 'identity' | 'weektime'; export type RhCodeRuleDateType = 'yyyyMMdd' | 'yyyyMMddHHmmss' | 'HHmmss' | 'yyyy' | 'yyyyMM' | 'yyMMdd'; /** 重置类型:年、月、日、不启用 */ export type RhResetCategoryType = 'y' | 'm' | 'd' | 'n'; /** 生成代码示例接口 */ export interface IGenerateCode { /** 动态字段 */ DynamicStrings: string[]; } /** 编码规则输入参数接口 */ export interface ICodingRuleInput { /** */ CodingRuleExpression: string; /** 编码规则 */ CodingRules: string[]; } /** 编码字段模型 */ export declare class CodeRuleFieldDto extends RhSelectItemT { Value: WithNil; Text: string; id: WithNil; data: WithNil; constructor(Value: WithNil, Text: string); static create(value: RhCodeRuleCategoryType, Text: string): CodeRuleFieldDto; } export declare class CodeRuleBaseDto extends RhSelectableDto { type: RhCodeRuleCategoryType; /** guid */ id: WithNil; constructor(); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleBaseDto; } /** 固定字符串编码模型 */ export declare class CodeRuleStringDto extends CodeRuleBaseDto { /** 取值 */ value: WithNil; constructor( /** 取值 */ value: WithNil); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleStringDto; } /** guid编码模型 */ export declare class CodeRuleGuidDto extends CodeRuleBaseDto { /** 是否显示连字符 */ hyphen: WithNil; /** 大小写 */ capital: 'Uppercase' | 'Lowercase'; constructor( /** 是否显示连字符 */ hyphen: WithNil, /** 大小写 */ capital: 'Uppercase' | 'Lowercase'); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleGuidDto; } /** 日期编码模型 */ export declare class CodeRuleDateDto extends CodeRuleBaseDto { /** 日期格式 */ format: WithNil; constructor( /** 日期格式 */ format: WithNil); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleDateDto; } /** 时间戳编码模型 */ export declare class CodeRuleTimeStampDto extends CodeRuleBaseDto { constructor(); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleTimeStampDto; } /** 动态字符串编码模型 */ export declare class CodeRuleDynamicDto extends CodeRuleBaseDto { /** 动态字符串数量 */ count: WithNil; unique: WithNil; constructor( /** 动态字符串数量 */ count: WithNil, unique: WithNil); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleDynamicDto; } /** 随机字符串编码模型 */ export declare class CodeRuleRandomDto extends CodeRuleBaseDto { /** 长度 */ length: WithNil; /** 是否需要数字 */ digital: WithNil; /** 是否需要大写字母 */ uppercase: WithNil; /** 是否需要小写字母 */ lowercase: WithNil; /** 是否需要符号 */ symbol: WithNil; constructor( /** 长度 */ length: WithNil, /** 是否需要数字 */ digital: WithNil, /** 是否需要大写字母 */ uppercase: WithNil, /** 是否需要小写字母 */ lowercase: WithNil, /** 是否需要符号 */ symbol: WithNil); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleRandomDto; } /** 自增字符串 */ export declare class CodeRuleIncrementDto extends CodeRuleBaseDto { /** 上一次自增值 */ LastIdentityValue: WithNil; /** 间隔值 */ interval: WithNil; /** 最小位数 */ minLength: WithNil; resetCategory: WithNil; constructor( /** 上一次自增值 */ LastIdentityValue: WithNil, /** 间隔值 */ interval: WithNil, /** 最小位数 */ minLength: WithNil, resetCategory: WithNil); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleIncrementDto; } export declare class CodeRuleWeekTimeDto extends CodeRuleBaseDto { /** 如何计算一年的第一周:0: 表示从每年的第一天开始计算。1:表示从设定的一周的首天开始计算*/ firstWeekType: 0 | 1 | number; /** 一周的第一天 */ firstDay: WeekDay; constructor( /** 如何计算一年的第一周:0: 表示从每年的第一天开始计算。1:表示从设定的一周的首天开始计算*/ firstWeekType: 0 | 1 | number, /** 一周的第一天 */ firstDay: WeekDay); static create(id: string, type: RhCodeRuleCategoryType): CodeRuleWeekTimeDto; } /** 编码规则数据传出对象 */ export declare class GeneratingCodeDto { /** 模块键值 */ ModuleKey: WithNil; /** 业务键值 */ BusinessKey: WithNil; /** 动态字段 */ DynamicStrings: WithNil; constructor( /** 模块键值 */ ModuleKey: WithNil, /** 业务键值 */ BusinessKey: WithNil, /** 动态字段 */ DynamicStrings: WithNil); static create(): GeneratingCodeDto; }